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
Warnings : 1

New User


Joined: 10 Nov 2015
Posts: 44
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: 2023
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: 1255
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
Warnings : 1

New User


Joined: 10 Nov 2015
Posts: 44
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top