Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Repacing data at a fixed position in a dataset with spaces.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
bibek24

New User


Joined: 14 Aug 2007
Posts: 35
Location: Hyderabad

PostPosted: Fri Sep 19, 2008 2:33 pm    Post subject: Repacing data at a fixed position in a dataset with spaces.
Reply with quote

I have a dataset which have records that contain either 'X' or 'Y' in the last position(say 420 position).Based on this criteria I have a sort card which separates out 'X' and 'Y' records into two different files.
The sort card looks like:
Code:

  SORT FIELDS=COPY                         
  OUTFIL FILES=1,INCLUDE=(420,1,CH,EQ,C'X')
  OUTFIL FILES=2,INCLUDE=(420,1,CH,EQ,C'Y')
  END                                     


My requirement is that 'X' and 'Y' should not appear in the o/p files.This particular position should be replaced with spaces.
The record length of these two o/p files is 420 and I want to retain that.

Is there any replace command which can be used along with the above SORT card which would replace 'X' and 'Y' characters to spaces?
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Sep 19, 2008 2:38 pm    Post subject: Reply to: Repacing data at a fixed position in a dataset wit
Reply with quote

Bibe,

Quote:
Is there any replace command which can be used along with the above SORT card which would replace 'X' and 'Y' characters to spaces?


Try using OVERLAY command.
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Fri Sep 19, 2008 2:42 pm    Post subject:
Reply with quote

You can use overlay, see below

Code:


SORT FIELDS=COPY                         
 OUTFIL FILES=1,INCLUDE=(420,1,CH,EQ,C'X'),
 OVERLAY=(420:C' ')                         
 OUTFIL FILES=2,INCLUDE=(420,1,CH,EQ,C'Y'),
 OVERLAY=(420:C' ')                         
Back to top
View user's profile Send private message
bibek24

New User


Joined: 14 Aug 2007
Posts: 35
Location: Hyderabad

PostPosted: Fri Sep 19, 2008 4:46 pm    Post subject:
Reply with quote

Thanks,
Its working
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts Data security erase on RAID device steve-myers All Other Mainframe Topics 0 Sat Jan 13, 2018 6:41 am
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts Append the milliseconds to the data s... girishb2 DFSORT/ICETOOL 1 Thu Dec 21, 2017 9:07 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us