Is it possible to reformat using DFSORT? I'm not sure my shop has the latest release installed.
The file is FB with LRECL 325. The position of the field is 174 and length is 9.
Please help. _________________ Thank You
-Ace
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Aug 17, 2006 10:33 am Post subject:
Ace,
Here's a DFSORT job that will do what you asked for. However, you will need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) to use JFY. If you don't have the April, 2006 PTF installed, 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 April, 2006 PTF, see:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/325)
//SORTOUT DD DSN=... output file (FB/325)
//SYSIN DD *
OPTION COPY
* Left-justify, removing leading zeros.
INREC OVERLAY=(174:174,9,JFY=(SHIFT=LEFT,PREBLANK=C'0'),
* Ensure first two bytes, including blanks, are converted to
* ZD digits and add 7 ZD 0's.
174:174,2,ZD,TO=ZD,C'0000000')
/*
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Thanks Frank.
Unfortunately I do not have the required PTF installed and I'm not in a position to request for an update (Since we are not authorized to contact them). I'm getting an error in JFY=(SHIFT=LEFT,PREBLANK=C'0'). Could you please tell me whether any other option available. _________________ Thank You
-Ace
Kolusu
This is working only for the first condition
ie : 123456789 changed to 120000000
All other instances it is giving all zeros like, 000000000 _________________ Thank You
-Ace
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Aug 17, 2006 12:13 pm Post subject:
Kolusu,
I think you misread the requirement. Dividing by +10000000 is not equivalent to removing the leading zeros to get the first two significant digits. When I run your statements, I get the following for SORTOUT which does not match the required output:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Aug 17, 2006 12:24 pm Post subject:
Ace,
You said that DFSORT flagged JFY. Since it didn't flag OVERLAY, it appears you do have the Dec, 2004 PTF, so you can use this more complicated set of IFTHEN clauses to do what you want:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum