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