The code is below. The input file is VB format is
RECFM=VB,LRECL=11004,BLKSIZE=0,DSORG=PS. Once executed , i compare the Input and output file SUPERCE shows all the records difference, but i can't make out whats the difference, because both look same in HEX format too. I am puzzled..Could anyone please advise on this? Since its an VB file do i need to start 4 position after , i tried it but it reads the records from 5th position.
Cheers
MAIN:
Call A01_OPEN_FILES
Call B01_INITIALISATION
Call C01_PROCESS_STR_1
Call D01_TERMINATION
Call EXITCMD
Return
A01_OPEN_FILES:
DROP DDI1
"execio * diskr infile1 (stem ddi1. finis"
DROP DDO1.
DROP DDO2.
B01_INITIALISATION:
r = 1
Final_RC = 0
counter = 1
No_of_rec = ddi1.0
Return
EXITCMD:
/* To show the return code when running in ispf */
If Final_RC = 0 Then
Do
Say "Successful Completition "
End
Else
Say "Unsuccessful Completition"
Exit Final_RC
Return
C01_PROCESS_STR_1:
If ddi1.0 < 2 Then
Do
Final_RC = 8
Call EXITCMD
End
Else
do
Do While counter < = No_of_rec
counter = counter + 1
str_start = substr(ddi1.r,1,112)
str_rec_id = substr(ddi1.r,113,2)
str_00_frt = substr(ddi1.r,115,1585)
Say "Read"
SAY str_rec_id
ddo1.r=str_start||str_rec_id||str_00_frt
r=r+1
End
End
Return
D01_Termination:
say 'in termination'
No_ip_rec = counter-1
No_op_rec = r-1
execio * diskw ofile1 (stem ddo1. finis"
final_RC=0
Return
Call A01_OPEN_FILES
Call B01_INITIALISATION
Call C01_PROCESS_STR_1
Call D01_TERMINATION
Call EXITCMD
Return
A01_OPEN_FILES:
DROP DDI1
"execio * diskr infile1 (stem ddi1. finis"
DROP DDO1.
DROP DDO2.
B01_INITIALISATION:
r = 1
Final_RC = 0
counter = 1
No_of_rec = ddi1.0
Return
EXITCMD:
/* To show the return code when running in ispf */
If Final_RC = 0 Then
Do
Say "Successful Completition "
End
Else
Say "Unsuccessful Completition"
Exit Final_RC
Return
C01_PROCESS_STR_1:
If ddi1.0 < 2 Then
Do
Final_RC = 8
Call EXITCMD
End
Else
do
Do While counter < = No_of_rec
counter = counter + 1
str_start = substr(ddi1.r,1,112)
str_rec_id = substr(ddi1.r,113,2)
str_00_frt = substr(ddi1.r,115,1585)
Say "Read"
SAY str_rec_id
ddo1.r=str_start||str_rec_id||str_00_frt
r=r+1
End
End
Return
D01_Termination:
say 'in termination'
No_ip_rec = counter-1
No_op_rec = r-1
execio * diskw ofile1 (stem ddo1. finis"
final_RC=0
Return