IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

A tool for unpacking a packed file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vickey_tcs

New User


Joined: 14 Mar 2009
Posts: 5
Location: At Desk

PostPosted: Sun Apr 26, 2009 6:55 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sun Apr 26, 2009 7:22 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Apr 26, 2009 7:30 pm
Reply with quote

vickey_tcs,
are you talking about a file that contains packed-decimal fields?
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Sun Apr 26, 2009 7:36 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Apr 26, 2009 8:05 pm
Reply with quote

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
View user's profile Send private message
vickey_tcs

New User


Joined: 14 Mar 2009
Posts: 5
Location: At Desk

PostPosted: Sun Apr 26, 2009 10:56 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Apr 26, 2009 11:06 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Apr 26, 2009 11:46 pm
Reply with quote

it might be easier for You
( if any of them is available )
to rely on the formatting capabilities of FILEAID or FILEMANAGER

I can tell for FILEMANAGER

see this topic for more info on the subject... the issue is almost the same
ibmmainframes.com/viewtopic.php?t=31446&highlight=rexx+copybook+processing
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Apr 27, 2009 12:06 am
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Apr 27, 2009 12:33 am
Reply with quote

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
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Mon Apr 27, 2009 7:46 pm
Reply with quote

Since we're all speculating, my guess is unpacking PD fields to prepare for FTP. I hope vicky_tcs returns soon!
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Mon Apr 27, 2009 8:24 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top