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

DFSORT - VB file RDW getting overridden


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

New User


Joined: 10 Nov 2015
Posts: 45
Location: USA

PostPosted: Thu Apr 27, 2023 7:40 pm
Reply with quote

Hi Team - I have a input file VB file containing trailer with incorrect record count. Input has different RDW for different records based on the record length.

Using the SORT card shown below, I am updating the count value I need in trailer.

Code:
SORT FIELDS=COPY
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(2000:SEQNUM,7,PD)),
       IFTHEN=(WHEN=(141,3,CH,EQ,C'TRL'),
       OVERLAY=(543:2000,7,PD,SUB,+1,TO=PD,LENGTH=7))


Unfortunately, the SORTOUT file has incorrect RDW value, 1999 for all the records. I have given the record length in JCL DCB parameter as 1999.

The record length of the output is per need but seems like the OVERLAY is messing up the RDW for SORTOUT.

Any constructive feedback appreciated.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Fri Apr 28, 2023 1:56 am
Reply with quote

It is not OVERLAY, but yourself who is messing up the RDW for SORTOUT.

You MUST take into account the RDW in each record as if it was a part of your record.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Mon May 01, 2023 1:36 pm
Reply with quote

Try the following instead:
Code:
OPTION COPY                               
OUTFIL IFTRAIL=(TRLID=(141,3,CH,EQ,C'TRL'),
  TRLUPD=(543:COUNT=(PD,LENGTH=7)))       
END
Back to top
View user's profile Send private message
elixir1986

New User


Joined: 10 Nov 2015
Posts: 45
Location: USA

PostPosted: Tue May 02, 2023 11:59 pm
Reply with quote

It worked fine. Thanks!
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 Unable to interpret a hex value to De... COBOL Programming 7
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts DFSORT GUID DFSORT/ICETOOL 5
Search our Forums:

Back to Top