FILE-CONTROL.
SELECT REC-11-FILE ASSIGN TO REC11FLE
FILE STATUS IS FS-REC11FLE.
FD REC-11-FILE
RECORDING MODE IS V
RECORD IS VARYING IN SIZE
FROM 1 TO 450
DEPENDING ON WS-REC-LEN
LABEL RECORDS ARE STANDARD
BLOCK CONTAINS 0.
01 REC-11-REC PIC X(450).
WORKING STORAGE SECTION
01 WS-REC-11 PIC X(450).
PROCEDURE DIVISION.
OPEN I-O REC-11-FILE
2000-CONVERT-DIV-SUB.
Some logic
display 'bforerite- REC-11-REC:'REC-11-REC
REWRITE REC-11-REC from WS-REC-11
display 'afterrite- REC-11-REC:'REC-11-REC
.
2000-CONVERT-DIV-SUB-EXIT.
EXIT.
CLOSE REC-11-FILE
Output of this program.
bforerite- REC-11-REC:101737 12345678911CAA
afterrite- REC-11-REC:101737 12345678911CAA1
Here we are opening the file in I/O mode and updating one field from 3
byte to 4 byte. When we display in the program we are getting correct
only. But it is not re writing to dataset.
JCL:
//MAINSTEP EXEC PGM=PSG4198
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//REC11FLE DD DSN=TADPM63.RM.EXPANDED.AR.CLP3,DISP=MOD
// DCB=(LRECL=454,RECFM=VB,BLKSIZE=0),
// SPACE=(TRK,(01,05),RLSE),
// UNIT=SYSDA
Data in the REC11FLE file before submitting the JOB:
TADPM63.RM.EXPANDED.AR.CLP3--> 101737 12345678911CAA
After successful completion of the JOB. The data in the file is same.
It is not updating though we are getting correct data in the program.
Data in the REC11FLE file after submitting the JOB:
TADPM63.RM.EXPANDED.AR.CLP3--> 101737 12345678911CAA
Please assist me what would be the problem...!!!