Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

A tool for unpacking a packed file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: A tool for unpacking a packed file
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

Moderator Team Head


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

PostPosted: Sun Apr 26, 2009 7:22 pm    Post subject: Reply to: A tool for unpacking a packed file
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: 6967
Location: porcelain throne

PostPosted: Sun Apr 26, 2009 7:30 pm    Post subject:
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    Post subject:
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: 1228
Location: Israel

PostPosted: Sun Apr 26, 2009 8:05 pm    Post subject: Reply to: A tool for unpacking a packed file
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Apr 26, 2009 11:06 pm    Post subject: Reply to: A tool for unpacking a packed file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Apr 26, 2009 11:46 pm    Post subject: Reply to: A tool for unpacking a packed file
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
http://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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Mon Apr 27, 2009 12:06 am    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us