View previous topic :: View next topic
Author
Message
alexkleyner New User Joined: 01 May 2023Posts: 5 Location: usa
Hi ,I am looking for some help. I have a variable block file.I am using 1st sort jcl step to convert file from VB to FB
Code:
//SYSIN DD * *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(5,1200)
END
and the 2nd sort step to create a TRAILER1
Code:
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(1:DATENS=(4MD),9:TIMENS=(24),COUNT=(M11,LENGTH=10),
25:TOT=(67,8,PD,TO=ZD,LENGTH=17))
END
It works fine for me,but i am looking for suggestions on how this can be accomplished in one step.Any help is greatly appreciated.
Thanks
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1337 Location: Bamberg, Germany
Just put both parts together, and omit the NODETAIL keyword.
Code:
OPTION COPY
OUTFIL FNAMES=(SORTOUT),
REMOVECC,VTOF,
BUILD=(5,1200),
TRAILER1=(1:DATENS=(4MD),9:TIMENS=(24),COUNT=(M11,LENGTH=10),
25:TOT=(67,8,PD,TO=ZD,LENGTH=17))
END
Back to top
alexkleyner New User Joined: 01 May 2023Posts: 5 Location: usa
Actually, i do not need detail in the output.I just need the lrecl 41 trailer record in the output. So, i added nodetail back.
Code:
OPTION COPY
OUTFIL FNAMES=(SORTOUT),
REMOVECC,NODETAIL,VTOF,
BUILD=(5,41),
TRAILER1=(1:DATENS=(4MD),9:TIMENS=(24),COUNT=(M11,LENGTH=10),
25:TOT=(67,8,PD,TO=ZD,LENGTH=17))
END
For some reason now my total calculation abends.not sure why
Code:
6----+----7----+----8
*********************
Ë m
000000000007192000000
00C000C0000384C000000
--------------------
<
000000000004234000000
00C000C0001118C000000
Back to top
alexkleyner New User Joined: 01 May 2023Posts: 5 Location: usa
can't make it work. it fails with soc7 i assume on the total calculation. any suggestions ?
Back to top
dneufarth Active User Joined: 27 Apr 2005Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
Just curious. Is the trailer TOT beyond your rec length?
Back to top
alexkleyner New User Joined: 01 May 2023Posts: 5 Location: usa
it is. But even if i change build=(5:1200) and change lrecl=1200 still getting same soc7,
Code:
// DCB=(RECFM=FB,LRECL=1200,BLKSIZE=0)
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=(SORTOUT),
REMOVECC,NODETAIL,VTOF,
BUILD=(5,1200),
TRAILER1=(1:DATENS=(4MD),9:TIMENS=(24),COUNT=(M11,LENGTH=10),
25:TOT=(74,7,PD,TO=ZD,LENGTH=17))
END
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1337 Location: Bamberg, Germany
Please check the offset for the TOT field, shouldn't this be 72 length 7 now?
Back to top
alexkleyner New User Joined: 01 May 2023Posts: 5 Location: usa
Appreciate you help.It does work now.Just want to understand.The starting position is 72 now changed from 67.I understand that.but why do i need to change the length from 8 to 7?
Thanks.
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1337 Location: Bamberg, Germany
My mistake, of course it's still length eight. Just verify that the beginning offset is correct. ABEND S0C7 means that PD fields could not be summed up, an indicator that length/offsets might be wrong.
Back to top
Please enable JavaScript!