View previous topic :: View next topic
|
Author |
Message |
vickey_tcs
New User
Joined: 14 Mar 2009 Posts: 5 Location: At Desk
|
|
|
|
Hi,
I m Planning to write a tool to unpack a packed dataset.My input will be a dataset where there can be few packed data in the file. I want my new tool to unpack the packed data and write all the fields into a new dataset (fully unpacked data).Can any one help me out on this?? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I must admit that I don't know much about this concept of "packed" datasets, but I thought that ISPF services can handle all of the pack/unpack processes? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
vickey_tcs,
are you talking about a file that contains packed-decimal fields? |
|
Back to top |
|
|
mtaylor
Active User
Joined: 20 Feb 2009 Posts: 108 Location: Kansas City
|
|
|
|
You're unpacking tool must also have as input the locations of all packed fields in the file because there is no way to differentiate from the actual file where packed fields begin/end.
This requirement can complicate the implementation a lot. One approach is to give as input the copybook corresponding to the file, but then your tool must parse the copybook. This isn't impossible or especially difficult but maybe more work than you had anticipated. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Or are you talking about a dataset with packed members ????
There are a few different things that can be packed. Please be more precise. |
|
Back to top |
|
|
vickey_tcs
New User
Joined: 14 Mar 2009 Posts: 5 Location: At Desk
|
|
|
|
HI,
Yes the tool will first get the file(dataset), then the layout(copybook) of the file, the tool should map the layout and the file so as to unpack the packed file and create a new file by calculating the new LRECL of the file and then load all the fields into it..is this possible??? Please suggest |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Yes ?? to what question are You replying...
1) ISPF packed data
2) some form of data compression
3) packed decimal numeric fields, binary numeric fields
the question might be clear to You, You did little to make it clear to everybody else |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
vickey_tcs: be aware there is an option under ISPF to pack files. This is a form of compression and has absolutely nothing to do with packed decimal fields. Packed files must be unpacked before they can be used as input to a compiler, text editor, or any other application.
Your posts do not make it clear if you have these packed files that you want to unpack, or if you have individual packed decimal fields you want to unpack, or if you are talking about some form of compression that was used to "pack" the data.
Further, there has been discussion on this forum about these topics in the past -- have you used the search function to review them before posting? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
If you are talking about unpacking packed decimal fields, WHY? Packed decimal is smaller and more efficient for use. Is this because you are a new programmer and haven't learned how to decipher PD? |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Since we're all speculating, my guess is unpacking PD fields to prepare for FTP. I hope vicky_tcs returns soon! |
|
Back to top |
|
|
mtaylor
Active User
Joined: 20 Feb 2009 Posts: 108 Location: Kansas City
|
|
|
|
I agree with Bill, and I thought it was pretty obvious that's what vickey_tcs was referring to. I used to get the request to unpack packed decimal data all the time. Having a tool to do this would be very helpful. But then why not add other formatting options:
expand packed decimal and comma separate fields?
expand packed decimal and convert to xml output?
At some point you'll end up rewriting Easytrieve. |
|
Back to top |
|
|
|