|
View previous topic :: View next topic
|
| Author |
Message |
skommawar1
New User
Joined: 03 Aug 2012 Posts: 1 Location: Hyderabad
|
|
|
|
| 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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|