**** START OF SPECIFICATIONS ***************************************** 00010000 * * 00020000 *01* MODULE NAME = APSUX04Y * 00030000 * * 00040000 * $MOD(APSUX04 ) COMP(APS) PROD(PSF) : VERSION 3.2.0 * 00050000 * * 00060000 *01* DESCRIPTIVE NAME = * 00070000 * LOGICAL RECORD INSTALLATION EXIT EXAMPLE * 00080000 * (DATA STREAM RECORDS). * 00090000 * * 00100000 *01* STATUS = VERSION 3, RELEASE 2, LEVEL 0 * 00110000 * * 00120000 *01* FUNCTION = * 00130000 * ADD RECORDS TO THE DATA STREAM * 00140000 * * 00150000 *02* OPERATION = * 00160000 * 1. VERIFY THAT THE CURRENT RECORD IS A DATA STREAM RECORD. * 00170000 * 2. CLEAR WORK STORAGE IN THE APSUECA WORK BUFFER. * 00180000 * 3. BUILD THE INDEX, INDEX ENTRIES, AND RECORDS FOR THE * 00190000 * CURRENT RECORD AND THE ADDED DATA STREAM RECORDS. * 00200000 * 4. UPDATE THE PSF PROCESSING INDICATOR TO 'WRITE RECORDS * 00210000 * IN INDEX'. * 00220000 * 5. UPDATE THE INDEX POINTER IN PARAMETER LIST APSGEXTP. * 00230000 * * 00240000 *01* NOTES = * 00250000 *02* DEPENDENCIES = * 00260000 *02* RESTRICTIONS = * 00270000 *02* REGISTER CONVENTIONS = * 00280000 *02* PATCH LABEL = PSPACE * 00290000 * * 00300000 *01* MODULE TYPE = PROCEDURE * 00310000 *02* PROCESSOR = ASSEMBLER * 00320000 *02* ATTRIBUTES = REENTRANT * 00330000 * AMODE 31 * 00340000 * RMODE ANY * 00350000 * * 00360000 *01* ENTRY POINT = name * 00370000 *02* LINKAGE = * 00380000 * R1 = ADDRESS OF A 4 BYTE FIELD WHICH CONTAINS THE * 00390000 * ADDRESS OF APSGEXTP * 00400000 * R15 = ENTRY POINT ADDRESS * 00410000 * R13 = SAVE AREA ADDRESS * 00420000 * * 00430000 *01* INPUT = * 00440000 * * 00450000 *01* OUTPUT = * 00460000 * INDEX AND RECORDS IN THE APSUECA * 00470000 * * 00480000 *01* EXIT NORMAL = RETURN TO CALLER * 00490000 * * 00500000 *01* EXIT ERROR = NONE * 00510000 * * 00520000 *01* EXTERNAL REFERENCES = * 00530000 *02* ROUTINES = NONE * 00540000 *02* DATA AREAS = * 00550000 * APSGEXTP - PSF INSTALLATION EXIT PARAMETER AREA * 00560000 * APSUECA - PSF EXIT COMMUNICATIONS AREA * 00570000 * IAZIDX - JES RECORD INDEX * 00580000 *02* INCLUDES = NONE * 00590000 * * 00600000 *01* MACROS = NONE * 00610000 * * 00620000 *01* MESSAGES = NONE * 00630000 * * 00640000 * 01* CHANGE ACTIVITY = * 00650000 * $H3=LAPS0003, HAF1220, 870928, BJ13WLC: RELEASE 2.1 * 00660000 * $L1=LAPS0004, HAF1228, 880601, B53KELJ: RELEASE 3.0 * 00670000 * $H5=LAPS0005, HPRF102, 033189, B53KDAR: REL 2.1.0 NEW FUNCT @H5A* 00680000 * $DU=LAPS0007,HPRF310,980604,BDKURLB: Version 3.1.0 @DUA* 00690000 * $DX=LAPS0008,HPRF320,991117,BUQ4RLB: Version 3.2.0 @DXA* 00700000 * * 00710000 **** END OF SPECIFICATIONS ******************************************* 00720000 APSUX04 START 0 00730000 TITLE 'DSECT - XTP' 00740000 APSGEXTP LIST=YES 00750000 TITLE 'DSECT - ECA' 00760000 APSUECA LIST=YES 00770000 TITLE 'DSECT - IAZIDX RECORD INDEX' 00780000 IAZIDX LIST=YES 00790000 TITLE 'INSTALLATION EXIT LOGICAL RECORD PROCESSOR EXAMPLE (DATX00800000 A STREAM DATA RECORDS)' 00810000 APSUX04 CSECT , 00820000 APSUX04 AMODE 31 @H5A 00830000 APSUX04 RMODE ANY @H5A 00840000 USING *,15 00850000 B START 00860000 DC AL1(16) LENGTH OF FOLLOWING FIELDS 00870000 DC CL8'APSUX04 ' NAME OF THIS ROUTINE 00880000 DC CL8'&SYSDATE' DATE OF THIS ASSEMBLY 00890000 DROP 15 00900000 START DS 0H 00910000 STM 14,12,12(13) SAVE CALLERS REGISTERS 00920000 LR BASEREG,15 SWITCH BASE REGISTER 00930000 USING APSUX04,BASEREG 00940000 USING APSGEXTP,XTPPTR 00950000 USING APSUECA,ECAPTR 00960000 USING IAZIDX,IDXPTR 00970000 USING IDXENTRY,IDXEPTR 00980000 USING NEWREC,RECPTR 00990000 USING CURREC,CURPTR 01000000 L XTPPTR,0(,1) LOAD ADDRESS OF APSGEXTP 01010000 L ECAPTR,XTPECAP LOAD ADDRESS OF APSUECA 01020000 LR 2,13 LOAD ADDRESS OF CALLERS SAVE 01030000 LA 13,ECAUSAVE ADDRESS OF APSUX04 SAVE AREA 01040000 ST 2,4(,13) SAVE CALLERS SAVE AREA ADDRESS 01050000 ST 13,8(,2) SAVE APSUX04 SAVE AREA ADDRESS 01060000 L IDXEPTR,XTPRIXP SET PTR TO PSF INDEX ENTRY 01070000 L CURPTR,IDXRADR LOAD ADDRESS OF PSF RECORD 01080000 ********************************************************************* 01090000 * TEST PSF RECORD FOR DATA STREAM AND DATA TYPE 01100000 ********************************************************************* 01110000 TM IDXFLAG1,IDXDSR CHECK FOR DATA STREAM RECORD 01120000 BZ DONE IF NOT BRANCH TO EPILOGUE 01130000 CLC DSTYPE,TYPEDATA CHECK FOR DATA TYPE RECORD 01140000 BNE DONE IF NOT BRANCH TO EPILOGUE 01150000 DROP CURPTR 01160000 ********************************************************************* 01170000 * INITIALIZE WORK POINTERS 01180000 ********************************************************************* 01190000 LA IDXPTR,ECAWKBUF SET PTR TO NEW INDEX 01200000 LA IDXEPTR,IDXSIZ(IDXPTR) SET PTR TO 1ST INDEX ENTRY 01210000 ********************************************************************* 01220000 * CLEAR WORK AREA. THE WORK AREA WILL CONTAIN THE INDEX HEADER, 01230000 * 3 INDEX ENTRIES FOLLOWED BY 2 ADDED RECORDS. 01240000 ********************************************************************* 01250000 SLR 8,8 RESET WORK REGISTER 01260000 SLR 9,9 RESET WORK REGISTER 01270000 L 7,WORKLEN SET LENGTH TO CLEAR 01280000 LR 6,IDXPTR SET ADDR OF TO FIELD 01290000 MVCL 6,8 MOVE FROM FIELD TO THE TO FIELD 01300000 ********************************************************************* 01310000 * BUILD THE INDEX HEADER 01320000 ********************************************************************* 01330000 MVC IDXID,INDEXID SET INDEX HEADER ID 01340000 LA 14,NUMIDXE 01350000 STH 14,IDXNUM SET NUMBER OF ENTRIES 01360000 ********************************************************************* 01370000 * COPY THE 1ST INDEX ENTRY FROM THE PSF INDEX ENTRY. 01380000 * THIS ENTRY POINTS TO THE CURRENT PSF RECORD. 01390000 * 01400000 * Set the record address and length in the IDX. This is @H5A 01410000 * necessary for 'spanned' records. For 'spanned' records, @H5A 01420000 * the original IDX points to the last section of the @H5A 01430000 * 'spanned' record. This IDX must point to the entire @H5A 01440000 * record. @H5A 01450000 ********************************************************************* 01460000 L 14,XTPRIXP SET PTR TO PSF INDEX ENTRY 01470000 MVC IDXENTRY(IDXESIZ),0(14) COPY PSF ENTRY TO NEW ENTRY 01480000 MVC IDXRECL(2),XTPRECL+2 SET RECORD LENGTH @H5A 01490000 MVC IDXRADR,XTPRECP SET RECORD ADDRESS @H5A 01500000 ********************************************************************* 01510000 * BUILD THE 2ND INDEX ENTRY AND 1ST ADDED RECORD 01520000 ********************************************************************* 01530000 LA RECPTR,IDXESIZ*NUMIDXE(IDXEPTR) 01540000 * SET PTR TO 1ST ADDED RECORD 01550000 LA 14,IDXESIZ SET LENGTH OF ENTRY 01560000 ALR IDXEPTR,14 SET PTR TO 2ND ENTRY 01570000 STH 14,IDXENTRL SET ENTRY LENGTH 01580000 ST RECPTR,IDXRADR SET RECORD ADDRESS 01590000 MVI IDXFLAG1,IDXDSR+IDXANSI SET RECORD TYPE TO DATA STREAM 01600000 * AND SET ANSI OR MACHINE CONTROL 01610000 * TO INDICATE THE 1ST BYTE ('5A') 01620000 * IS A CONTROL CHARACTER. 01630000 MVC IDXRECL,RECLEN SET RECORD LENGTH 01640000 MVC IDXRECID,RECID SET RECORD ID 01650000 MVC RECTEXT,DSCON COMPLETE NEW RECORD TEXT 01660000 ********************************************************************* 01670000 * BUILD THE 3RD INDEX ENTRY AND 2ND ADDED RECORD 01680000 ********************************************************************* 01690000 AH RECPTR,RECLEN ADJUST PTR TO 2ND NEW RECORD 01700000 LA 14,IDXESIZ SET LENGTH OF ENTRY 01710000 ALR IDXEPTR,14 ADJUST PTR TO 3RD ENTRY 01720000 STH 14,IDXENTRL SET ENTRY LENGTH 01730000 ST RECPTR,IDXRADR SET RECORD ADDRESS 01740000 MVI IDXFLAG1,IDXDSR+IDXANSI SET RECORD TYPE TO DATA STREAM 01750000 MVC IDXRECL,RECLEN SET RECORD LENGTH 01760000 MVC IDXRECID,RECID SET RECORD ID 01770000 MVC RECTEXT,DSCON COMPLETE NEW RECORD TEXT 01780000 ********************************************************************* 01790000 * UPDATE THE INSTALLATION EXIT PARAMETER LIST 01800000 ********************************************************************* 01810000 MVI XTPPIND,XTWRTIX SET PSF PROCESSING INDICATOR 01820000 * TO WRITE RECORDS IN INDEX 01830000 ST IDXPTR,XTPRIXP UPDATE POINTER TO NEWLY 01840000 * CREATED INDEX HEADER 01850000 ********************************************************************* 01860000 * EPILOGUE 01870000 ********************************************************************* 01880000 DONE SLR 15,15 PSF EXPECTS ZERO RETURN CODE 01890000 L 13,4(,13) RESTORE CALLERS SAVE AREA ADDR. 01900000 L 14,12(,13) RESTORE CALLERS RETURN ADDRESS 01910000 LM 0,12,20(13) RESTORE CALLERS REGISTERS 01920000 BR 14 RETURN TO CALLER 01930000 SPACE 2 01940000 NUMIDXE EQU 3 NUMBER OF INDEX ENTRIES 01950000 RECLEN DC Y(L'RECTEXT) LENGTH OF ADDED RECORD 01960000 INDEXID DC C'IDX ' USED FOR INDEX HEADER ID 01970000 WORKLEN DC F'300' LENGTH OF WORK AREA (LENGTH IS 01980000 * LONGER THAN NECESSARY) 01990000 RECID DC C'APSUX04 ' USED FOR RECORD ID 02000000 DSCON DS CL39 ADDED DATA STREAM RECORD 02010000 ORG DSCON 02020000 DC X'5A' DATA STREAM CONTROL CHARACTER 02030000 DC X'0026' LENGTH EXCLUDING THE '5A' 02040000 TYPEDATA DC X'D3EE9B' COMPOSED TEXT TYPE 02050000 DC X'00' FLAGS 02060000 DC X'0000' SEQUENCE 02070000 DC X'2BD3' ESCAPE CODE 02080000 DC X'02' LENGTH OF THIS CONTROL SEQ. 02090000 DC X'D9' BEGIN NEW LINE 02100000 DC X'1A' '1A' IS THE LENGTH OF DATA + 02110000 * LENGTH OF '1ADA' BYTES 02120000 DC X'DA' DATA CONTROL CODE 02130000 DC C'ADDED DATA STREAM RECORD' RECORD TEXT 02140000 SPACE 2 02150000 XTPPTR EQU 4 POINTER TO APSGEXTP 02160000 ECAPTR EQU 5 POINTER TO APSUECA 02170000 RECPTR EQU 6 POINTER TO APSUECA 02180000 CURPTR EQU 7 POINTER TO CURRENT PSF RECORD 02190000 IDXPTR EQU 10 POINTER TO NEW IAZIDX 02200000 IDXEPTR EQU 11 POINTER TO NEW INDEX ENTRY 02210000 BASEREG EQU 12 BASE REGISTER 02220000 SPACE 2 02230000 NEWREC DSECT ADDED RECORD DESCRIPTION 02240000 RECTEXT DS CL39 NEW RECORD INFORMATION 02250000 SPACE 2 02260000 CURREC DSECT CURRENT PSF DATA STREAM RECORD 02270000 DSCONC DS CL1 CONTROL CHARACTER 02280000 DS CL2 LENGTH 02290000 DSTYPE DS CL3 RECORD TYPE 02300000 END APSUX04 02310000