1 the below input file and output file
1. is that any way i can modify simply this code
2. need to remove each and every page have total records.
only i need last page only total records.
3. how to do CHANGE '1' AND '0' TO ' ' COLUMN 1
4. how to SORT AND EDIT BY REMOVING EXTRA HEADERS AND BLANK LINE 'MSNT.NY430.TEMP'
SYSPRT2 DD DSN=MSNT.NY430.TEMP,
DISP=(NEW,CATLG,DELETE),
SPACE=(28000,(10,10),RLSE),
DCB=(RECFM=FBA,LRECL=350,BLKSIZE=0)
SYSIN DD *
FILE SYSPRT2 PRINTER FB(350 28000)
FILE GLMFILE
FULL-REC 1 387 A
JRNL-KEY 1 33 A
CORP 1 5 A
JRNLID 6 10 A
JRNLID5 6 5 A
EFFDT 16 10 A
EFFDTYY 18 2 A
EFFDTMM 21 2 A
JRNLSQ 26 5 A
SUSPSQ 31 3 A
STATUS 48 1 A
BOA 49 5 A
ORG 54 5 A
ACCT 59 7 A
SUB-ACCT 66 3 A
PROD 69 4 A
PROJECT 76 8 A
CURR-IND 84 1 A
CUST 85 5 A
CCY 93 4 A
TAX 120 4 A
DESCR 129 70 A
CLS-KEY 199 3 A
* CCY-RATE 221 10 A
JA 251 2 A
JT 253 2 A
DCCD 258 1 A
AMT1 260 8 P 2
AMT2 268 8 P 2
AMT3 276 8 P 2
AMT4 284 8 P 2
DATESTMP 374 12 A
DEFINE AMT1-DR W 10 P 2
AMT1-CR W 10 P 2
AMT3-DR W 10 P 2
AMT3-CR W 10 P 2
RECORDS W 5 P 0 VALUE 1
JOB INPUT GLMFILE
IF AMT1 = 0 AND AMT3 = 0
GOTO JOB
END-IF
IF DCCD = 'D'
AMT1-DR = AMT1
AMT1-CR = 0
AMT3-DR = AMT3
AMT3-CR = 0
ELSE
AMT1-DR = 0
AMT1-CR = -(AMT1)
AMT3-DR = 0
AMT3-CR = -(AMT3)
END-IF
RECORDS = 1
PRINT RPT1
PRINT RPT2
END-IF
REPORT RPT2 NOSPREAD SUMSPACE 0 PRINTER SYSPRT2
SEQUENCE JRNL-KEY
CONTROL JRNL-KEY
TITLE 1 'JOURNAL EXTRACT
LINE CORP -2 +
JRNLID -2 +
EFFDT -2 +
JRNLSQ -2 +
SUSPSQ -2 +
RECORDS -2 +
BOA -2 +
ORG -2 +
ACCT -2 +
SUB-ACCT -2 +
PROD -2 +
PROJECT -2 +
CUST -2 +
CURR-IND -2 +
CCY -2 +
JA -2 +
JT -2 +
DCCD -2 +
AMT1-DR -2 +
AMT1-CR -2 +
AMT3-DR -2 +
AMT3-CR -2 +
DESCR -2 +
DATESTMP -2
DISP=(NEW,CATLG,DELETE),
SPACE=(28000,(10,10),RLSE),
DCB=(RECFM=FBA,LRECL=350,BLKSIZE=0)
SYSIN DD *
FILE SYSPRT2 PRINTER FB(350 28000)
FILE GLMFILE
FULL-REC 1 387 A
JRNL-KEY 1 33 A
CORP 1 5 A
JRNLID 6 10 A
JRNLID5 6 5 A
EFFDT 16 10 A
EFFDTYY 18 2 A
EFFDTMM 21 2 A
JRNLSQ 26 5 A
SUSPSQ 31 3 A
STATUS 48 1 A
BOA 49 5 A
ORG 54 5 A
ACCT 59 7 A
SUB-ACCT 66 3 A
PROD 69 4 A
PROJECT 76 8 A
CURR-IND 84 1 A
CUST 85 5 A
CCY 93 4 A
TAX 120 4 A
DESCR 129 70 A
CLS-KEY 199 3 A
* CCY-RATE 221 10 A
JA 251 2 A
JT 253 2 A
DCCD 258 1 A
AMT1 260 8 P 2
AMT2 268 8 P 2
AMT3 276 8 P 2
AMT4 284 8 P 2
DATESTMP 374 12 A
DEFINE AMT1-DR W 10 P 2
AMT1-CR W 10 P 2
AMT3-DR W 10 P 2
AMT3-CR W 10 P 2
RECORDS W 5 P 0 VALUE 1
JOB INPUT GLMFILE
IF AMT1 = 0 AND AMT3 = 0
GOTO JOB
END-IF
IF DCCD = 'D'
AMT1-DR = AMT1
AMT1-CR = 0
AMT3-DR = AMT3
AMT3-CR = 0
ELSE
AMT1-DR = 0
AMT1-CR = -(AMT1)
AMT3-DR = 0
AMT3-CR = -(AMT3)
END-IF
RECORDS = 1
PRINT RPT1
PRINT RPT2
END-IF
REPORT RPT2 NOSPREAD SUMSPACE 0 PRINTER SYSPRT2
SEQUENCE JRNL-KEY
CONTROL JRNL-KEY
TITLE 1 'JOURNAL EXTRACT
LINE CORP -2 +
JRNLID -2 +
EFFDT -2 +
JRNLSQ -2 +
SUSPSQ -2 +
RECORDS -2 +
BOA -2 +
ORG -2 +
ACCT -2 +
SUB-ACCT -2 +
PROD -2 +
PROJECT -2 +
CUST -2 +
CURR-IND -2 +
CCY -2 +
JA -2 +
JT -2 +
DCCD -2 +
AMT1-DR -2 +
AMT1-CR -2 +
AMT3-DR -2 +
AMT3-CR -2 +
DESCR -2 +
DATESTMP -2