Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us