suppose file contain number in alpahnumeric format(left align). I want to treat this alphanumeric data as a number and find out the total.
I/p file ---> data in alphanumeric format
Code:
data data type
1 alphanumeric
1 alphanumeric
2 alphanumeric
1 alphanumeric
I want to treat this data as number and o/p as sum of this record= 5
Is there any other option available in JCL or whether I have to write a program for changing alphanumeric field to numeric field and then calculate the total.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You need to use UFF format to convert the values to ZD, SUM the ZD values and then convert them back to the form you want. If you want the values left justified, you need to use JFY.
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 JFY function. 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: