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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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