Posted: Mon Jan 08, 2007 4:53 pm Post subject: Convert PD to left justified number and pad sapces to right
As a part of a requirement we are trying to Build a KSDS VSAM file from a Flat file. The Key of the VSAM which we are going to build is a combination of the following fields on flat file.
1) Account Number
2) Fund number
The Flat file has two record lay outs with the following definitions for the above fields
First record layout
1) Account number 9(10) COMP-3
2) Fund Number 9(5) Comp-3.
Fund number can have a value between 1 to 99999 in record lay out 1.
Second record lay out
1) Account number 9(10) COMP-3
2) Fund Number X(5).
Fund number can have a value between 1 to 99999 OR any other alpha numeric value in Record lay out 2.
Can I convert the fund number for record lay out 1 in the format of alphanumeric value using sort ?
To elaborate ...
If FUND NUMBER is X'00999C' I would like that to be changed to C'999BB '
If FUND NUMBER is X'09999C' I would like that to be changed to C'9999B'
If FUND NUMBER is X'00009C' I would like that to be changed to C'9BBBB'
(B - represents space in the above example.)
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jan 08, 2007 5:11 pm Post subject:
Novice,
Here's a DFSORT job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's NUM and JFY functions. If you don't have the April, 2006 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 April, 2006 PTF, see:
_________________ 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
I checked up with our system folks and they confirmed that the PTF is not applied and will be done after few months as right now we have a 'Freeze Period' in place on production movement
So in the mean time is there any other way to achieve the same?
and show me the //SYSOUT 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: Wed Jan 10, 2007 4:38 pm Post subject:
I forgot to ask - what is the RECFM and LRECL of the input file? _________________ 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: Wed Jan 10, 2007 4:43 pm Post subject:
Kolusu,
I was working on something similar, but I think the input file may be VB.
For the WHEN condition, it's easier to use:
WHEN=(9,1,BI,EQ,B'....1100') _________________ 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