I would like to know, if there is a way of storing the number of records of a file in the same file (in a copy of it, I mean).
for example:
input file (FB):
line 1..........xxxxxx
line 2...................
line 3...................
line 300.................
output file (FB):
line 1..........000300
line 2...................
line 3...................
line 300.................
The number should be on the fisrt record at position 67, the length and format are 6,CH.
What I achieved so far, is to have a file with just one record with the number of lines, but I don't understand, how can I use it in another call to ICETOOLS fo replacing the number on the first record of the output file.
I'm reading the info of z/OS DFSORT V1R5 PTF UK90013, especially the part of DATASORT, but I can't find the way, and in any case, I don't know if we have that PTF installed.
What I did for obtaining a file with the number of records is:
//P050 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=input file,DISP=(SHR)
//SORTOUT DD DSN=output file,
// DISP=(,CATLG,DELETE),
// SPACE=(00006,(005000,005000),RLSE,,),AVGREC=U,
// UNIT=(SYSALLDA,01),
// VOL=(),
// DATACLAS=,STORCLAS=,MGMTCLAS=,
// DCB=(RECFM=FB,LRECL=00006,BLKSIZE=0)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M11,LENGTH=6))
/*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=input file,DISP=(SHR)
//SORTOUT DD DSN=output file,
// DISP=(,CATLG,DELETE),
// SPACE=(00006,(005000,005000),RLSE,,),AVGREC=U,
// UNIT=(SYSALLDA,01),
// VOL=(),
// DATACLAS=,STORCLAS=,MGMTCLAS=,
// DCB=(RECFM=FB,LRECL=00006,BLKSIZE=0)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M11,LENGTH=6))
/*
Is this useful or can be done the entire task with a unique step?
I would kindly appreciate your help.
Thanks in advance.