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
 

 

Need help Field value change

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

New User


Joined: 27 Dec 2006
Posts: 36
Location: Chennai

PostPosted: Thu Oct 18, 2007 4:17 pm    Post subject: Need help Field value change
Reply with quote

Hi,

I have a file with length 571.
I need to replace the value 10 to 60 in the field 2,3.
The format of the field is S9(03) USAGE COMP-3

Please help me out to solve this.
Back to top
View user's profile Send private message

shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Thu Oct 18, 2007 4:53 pm    Post subject:
Reply with quote

nagarajan.dharani,

Please check with the following code for your requirement.
Code:
// EXEC PGM=SORT                                   
//SORTIN DD DSN=INFILE,DISP=SHR
//SORTOUT DD DSN=OUTFILE,...
//SYSOUT DD SYSOUT=*                               
 OPTION COPY                                       
 INREC IFTHEN=(WHEN=(2,2,PD,EQ,10),                 
 OVERLAY=(2:2,2,PD,ADD,+50,TO=PD,LENGTH=2))
/*
//
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: Thu Oct 18, 2007 8:59 pm    Post subject:
Reply with quote

nagarajan.dharani,

If you have a 2-byte PD field in positions 2-3 and you want to replace a value of +10 with a value of +60, but leave all other values unchanged, you can use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(2,2,PD,EQ,+10),
    OVERLAY=(2:+60,TO=PD,LENGTH=2))
/*


If that's not what you want to do, then please explain more clearly exactly what it is you want to do.
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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