//**** START OF SPECIFICATIONS *****************************************00010000 //* *00020000 //* MODULE NAME = APSUC15M *00030000 //* *00040000 //* $MOD (APSUC15 ) COMP(APS) PROD(PSF) : VERSION 3.2.2 *00050000 //* *00060000 //* DESCRIPTIVE NAME = Sample Download for OS/390 Print Parameter Exit *00070000 //* *00080000 //* STATUS = Version 3, Release 2, Level 2 *00090000 //* *00100000 //* FUNCTION = *00110000 //* This is installation sample exit APSUX15X written in C. *00120000 //* *00130000 //* Pass a string to Download to indicate if this is the first, *00140000 //* next, last, or only output dataset. This information can be *00150000 //* used by the AIX daemon to recombine multiple datasets into a *00160000 //* single job. *00170000 //* *00180000 //* OPERATION = The following items are done by this sample exit: *00190000 //* 1. Pick up dataset information from APSUECA. *00200000 //* 2. Formulate a string to pass to AIX in -opa *00210000 //* 3. Pass the string to Download for OS/390 *00220000 //* *00230000 //* NOTES = *00240000 //* DEPENDENCIES = None *00250000 //* RESTRICTIONS = None *00260000 //* *00270000 //* MODULE TYPE = Procedure *00280000 //* PROCESSOR = C *00290000 //* ATTRIBUTES = Reentrant *00300000 //* AMODE 31 *00310000 //* RMODE ANY *00320000 //* *00330000 //* ENTRY POINT = APSUC15 *00340000 //* LINKAGE = *00350000 //* One parameter is passed - the address of APSGEXTC *00360000 //* *00370000 //* INPUT = *00380000 //* APSGEXTC - PSF installation exit paramater area *00390000 //* *00400000 //* OUTPUT = *00410000 //* EBCDIC text string *00420000 //* *00430000 //* EXIT NORMAL = Return to caller *00440000 //* *00450000 //* EXIT ERROR = None *00460000 //* *00470000 //* EXTERNAL REFERENCES = *00480000 //* ROUTINES = None *00490000 //* DATA AREAS = *00500000 //* APSGEXTC - PSF installation exit parameter area *00510000 //* APSUECAC - PSF exit communications area *00520000 //* *00530000 //* MACROS = None *00540000 //* *00550000 //* MESSAGES = None *00560000 //* *00570000 //* CHANGE ACTIVITY = *00580000 //* $B0=LAPS0008, JPRF322, 000113, BDKUEAS: Initial Version @B0A*00590000 //* $EV=LAPS0009,HPRF332,010530,BUQ4RLB: Version 3.3.2 @EVA*00600000 //* *00610000 //**** END OF SPECIFICATIONS *******************************************00620000 00630000 #pragma comment(date) 00640000 #pragma csect(CODE,"$APSUC15") 00650000 #pragma csect(STATIC,"#APSUC15") 00660000 #pragma linkage(APSUC15,OS) 00670000 #pragma runopts(TRAP(OFF)) 00680000 #pragma map(apsuc15,"APSUC15") 00690000 00700000 /*--------------------------------------------------------------------- 00710000 #include these header files for structure & function definitions: 00720000 ---------------------------------------------------------------------*/ 00730000 00740000 #include 00750000 #include "apsgextc.h" 00760000 #include "apsuecac.h" 00770000 00780000 /*----------------------------------------------------------------------00790000 Miscellaneous declarations: 00800000 ----------------------------------------------------------------------*/00810000 00820000 #define FIRST "OUTGRP=FIRST" 00830000 #define NEXT "OUTGRP=NEXT" 00840000 #define LAST "OUTGRP=LAST" 00850000 #define ONLY "OUTGRP=ONLY" 00860000 00870000 void apsuc15(APSGEXTP * xtpptr) 00880000 { 00890000 /******************************************************************/ 00900000 /* The following flags in ECAFLAG are used to determine which */ 00910000 /* dataset this is in the JES group. */ 00920000 /* .1.. .... ECALSTDS Last dataset */ 00930000 /* 0 = Not the last dataset of the job */ 00940000 /* 1 = Last dataset of the job */ 00950000 /* ..1. .... ECAFSTDS First dataset */ 00960000 /* 0 = Not the first dataset of the job */ 00970000 /* 1 = First dataset of the job */ 00980000 /* Following are the combinations of the ECALSTDS and ECAFSTDS */ 00990000 /* flags and their meanings. */ 01000000 /* */ 01010000 /* 00 = Not first or last dataset (middle or next dataset) */ 01020000 /* 01 = First dataset */ 01030000 /* 10 = Last dataset */ 01040000 /* 11 = Only dataset */ 01050000 /******************************************************************/ 01060000 unsigned char (* ecawkptr)Ý1¨; // Will point to ECAWKBUF 01070000 01080000 ecawkptr = &(xtpptr->XTPECAP->ECABASE.ECAWKBUF); 01090000 // Get address of ECA work area 01100000 01110000 if (xtpptr->XTPECAP->ECABASE.ECAFLAG & ECAFSTDS) 01120000 // First on? (First or only) 01130000 if (xtpptr->XTPECAP->ECABASE.ECAFLAG & ECALSTDS) 01140000 // Last dataset flag on? 01150000 { // Only dataset 01160000 memcpy(ecawkptr, ONLY, strlen(ONLY)); 01170000 // Move 'ONLY' string 01180000 xtpptr->XTPECAP->ECABASE.ECARECLN = strlen(ONLY); 01190000 // Load length of string 01200000 } 01210000 else // Else first dataset 01220000 { 01230000 memcpy(ecawkptr, FIRST, strlen(FIRST)); 01240000 // Move 'FIRST' string 01250000 xtpptr->XTPECAP->ECABASE.ECARECLN = strlen(FIRST); 01260000 // Load length of string 01270000 } 01280000 else // Else first not on 01290000 if (xtpptr->XTPECAP->ECABASE.ECAFLAG & ECALSTDS) 01300000 // Last dataset flag on? 01310000 { // Last dataset 01320000 memcpy(ecawkptr, LAST, strlen(LAST)); 01330000 // Move 'LAST' string 01340000 xtpptr->XTPECAP->ECABASE.ECARECLN = strlen(LAST); 01350000 // Load length of string 01360000 } 01370000 else // Else next dataset 01380000 { 01390000 memcpy(ecawkptr, NEXT, strlen(NEXT)); 01400000 // Move 'NEXT' string 01410000 xtpptr->XTPECAP->ECABASE.ECARECLN = strlen(NEXT); 01420000 // Load length of string 01430000 } 01440000 01450000 xtpptr->XTPECAP->ECABASE.ECARECAD = ecawkptr; 01460000 // Store string address 01470000 01480000 } 01490000