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
 

 

Replacing of data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
praveensn

New User


Joined: 30 Jul 2008
Posts: 32
Location: Pune

PostPosted: Mon Jan 12, 2009 2:19 pm    Post subject: Replacing of data
Reply with quote

Hi,

I have an input file as below:

600 qoa = ABCD206111 A SO48953NE101LNKN3AN2007
600 qob = ABCD206111 A SP05890NE101LNKN3AN2007
600 qoc = ABCD206111 A SP06188NE101LNKN3AN2007
600 qod = ABCD206111 A SP06711NE101LNKN3AN2007
600 qoe = ABCD206111 A SP48424NE101LNKN3AN2007

I want to change the first 3 bytes i.e, from 600 to 100.

Could you please provide me the jcl for this.

Thanks in advance,
Praveen.N
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Jan 12, 2009 9:30 pm    Post subject:
Reply with quote

If you want to replace '600' with '100' and leave other values unchanged, you can use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN                                       
//SYSOUT    DD  SYSOUT=*                                       
//SORTIN DD *                                                 
600 qoa =   ABCD206111  A  SO48953NE101LNKN3AN2007             
600 qob =   ABCD206111  A  SP05890NE101LNKN3AN2007             
600 qoc =   ABCD206111  A  SP06188NE101LNKN3AN2007             
600 qod =   ABCD206111  A  SP06711NE101LNKN3AN2007             
600 qoe =   ABCD206111  A  SP48424NE101LNKN3AN2007             
//SORTOUT DD SYSOUT=*                                         
//SYSIN    DD    *                                             
  OPTION COPY                                                 
  INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'600'),OVERLAY=(1:C'100'))   


If you want to change positions 1-3 to '100' in every record regardless of the original value, you can use a DFSORT job like this:

Code:

//S2    EXEC  PGM=ICEMAN                                   
//SYSOUT    DD  SYSOUT=*                                   
//SORTIN DD *                                             
600 qoa =   ABCD206111  A  SO48953NE101LNKN3AN2007         
600 qob =   ABCD206111  A  SP05890NE101LNKN3AN2007         
600 qoc =   ABCD206111  A  SP06188NE101LNKN3AN2007         
600 qod =   ABCD206111  A  SP06711NE101LNKN3AN2007         
600 qoe =   ABCD206111  A  SP48424NE101LNKN3AN2007         
//SORTOUT DD SYSOUT=*                                     
//SYSIN    DD    *                                         
  OPTION COPY                                             
  INREC OVERLAY=(1:C'100')                                 


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


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