Hi,
I am wondering if DFSORT can be used to Unpack fields on a file?
For example, the file is 80 bytes with 10 fields of Pic s9(12)V99 comp-3
and the desired output is to be 150 bytes with 10 fields of Pic 9(15).
If the file that I want to unpack also has a field that is character (CH) would I just add a statement to the INREC such as
41,32,CH,TO=CH,length=32?
I get error ICE007A E SYNTAX ERROR on the CH.
Assume the fields prior 1-40 are composed of packed data and the desired output contains the unpacked data plus the 32 characters.
What is the link for the manual on this feature?
Thank-you,
Gayle
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
For character fields, you just specify their input position and length (p,m) -> you're not doing any conversion so you shouldn't specify a format, TO or LENGTH. So you'd just have 41,32 for the CH field.
Quote:
What is the link for the manual on this feature?
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Thank-you!
I have only used DFSORT to sort files, or to include or omit.
I had just become aware of some of its other features.
I will read the reference you provided.
Thank-you again!
Gayle
If you need more specific help, tell me the starting position, length and format of the input field and exactly what you want the output field to look like.
Frank,
How would you code the dfsort parameter if I gave you the following...
A specific record that I have to unpack to numeric edit fields looks like:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Gayle,
It's a little hard to tell what positions you want the output fields in and the output example you show has some of the numbers wrong vs the input, but hopefully the following DFSORT control statements will give you something close enough to play around with:
Frank,
This helps alot!
Sorry about the confusion of the input and output fields.
I can follow your example and will play with my file.
Thank-you again!