IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

convert file from VB to FB and use trailer1 in 1 step ?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
alexkleyner

New User


Joined: 01 May 2023
Posts: 5
Location: usa

PostPosted: Mon May 01, 2023 6:30 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Mon May 01, 2023 9:51 am
Reply with quote

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
View user's profile Send private message
alexkleyner

New User


Joined: 01 May 2023
Posts: 5
Location: usa

PostPosted: Mon May 01, 2023 8:49 pm
Reply with quote

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
View user's profile Send private message
alexkleyner

New User


Joined: 01 May 2023
Posts: 5
Location: usa

PostPosted: Tue May 02, 2023 2:44 am
Reply with quote

can't make it work. it fails with soc7 i assume on the total calculation. any suggestions ?
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Tue May 02, 2023 4:51 am
Reply with quote

Just curious. Is the trailer TOT beyond your rec length?
Back to top
View user's profile Send private message
alexkleyner

New User


Joined: 01 May 2023
Posts: 5
Location: usa

PostPosted: Tue May 02, 2023 5:02 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Tue May 02, 2023 9:31 am
Reply with quote

Please check the offset for the TOT field, shouldn't this be 72 length 7 now?
Back to top
View user's profile Send private message
alexkleyner

New User


Joined: 01 May 2023
Posts: 5
Location: usa

PostPosted: Wed May 03, 2023 3:38 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Wed May 03, 2023 10:10 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top