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
 

 

Using OVERLAY to replace PD

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

New User


Joined: 03 Aug 2012
Posts: 1
Location: Hyderabad

PostPosted: Wed Aug 08, 2012 2:36 pm    Post subject: Reg: OVERLAY option
Reply with quote

Frank Yaeger wrote:
Here are two different ways to do this with DFSORT:

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=(23,2,CH,EQ,C'01'),OVERLAY=(23:C'10'))
/*


Code:

//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(23:23,2,CHANGE=(2,C'01',C'10'),NOMATCH=(23,2))
/*


You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's IFTHEN and OVERLAY functions. Only DFSORT has these functions, so if you don't have DFSORT, you won't be able to use them. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/


By using OVERLAY option can we change the Packed Decimal filed value also and is there any difference in the OVERLAY syntax for PD fields? Please suggest me.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7307

PostPosted: Wed Aug 08, 2012 2:48 pm    Post subject: Reply to: Using OVERLAY to replace PD
Reply with quote

Please don't tailgate an old topic. A very old topic. New question, new topic.

Yes, you can do PD (and any type of data) with OVERLAY. Full details in the manuals, link in this forum and at the top of the page.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Aug 08, 2012 11:05 pm    Post subject:
Reply with quote

skommawar1,

If you want to update a packed decimal value you can use either one of the following.

Code:

INREC IFTHEN=(WHEN=(5,4,PD,EQ,2),OVERLAY=(5:X'0000000C'))


This would make the PD value at position 5 a zero when the original value is 2.

You can use TO=PD also to achieve the same result.
Code:

INREC IFTHEN=(WHEN=(5,4,PD,EQ,2),OVERLAY=(5:+0,TO=PD,LENGTH=4))
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 Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am
No new posts Need a help how to replace a string i... gurunath82 CLIST & REXX 12 Tue Jul 26, 2016 11:43 pm


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