IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Using OVERLAY to replace PD


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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:

Use [URL] BBCode for External Links


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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 08, 2012 2:48 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts To replace jobname in a file with ano... SYNCSORT 12
No new posts Conditional replace values in output ... DFSORT/ICETOOL 3
Search our Forums:

Back to Top