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

To replace a character in last record in a file using DFSORT


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

New User


Joined: 14 Aug 2008
Posts: 7
Location: Chennai

PostPosted: Wed Feb 02, 2011 7:01 pm
Reply with quote

I have a requirement to copy the entire file and to replace a character 'OR' with symbol ' )' in the last record of the file.

LRECL=80

Regards,
Senthil.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Feb 02, 2011 10:31 pm
Reply with quote

dssenthil,

I am guessing that the requirement is to end to the sysin control cards. You can add dummy condition as your last record to end the sysin.

For ex if you had control cards like this
Code:

  INCLUDE COND=(4,10,CH,EQ,'AAAAAAAAAA',OR,       
                4,10,CH,EQ,'BBBBBBBBBB',OR,       
                4,10,CH,EQ,'CCCCCCCCCC',OR,       
                4,10,CH,EQ,'DDDDDDDDDD',OR,       
                4,10,CH,EQ,'EEEEEEEEEE',OR,       


You can add dummy false condition like this
Code:

INCLUDE COND=(4,10,CH,EQ,'AAAAAAAAAA',OR,
              4,10,CH,EQ,'BBBBBBBBBB',OR,
              4,10,CH,EQ,'CCCCCCCCCC',OR,
              4,10,CH,EQ,'DDDDDDDDDD',OR,
              4,10,CH,EQ,'EEEEEEEEEE',OR,
              4,1,CH,NE,4,1,CH)           
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 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 Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top