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
 

 

What does Unpacking all packed fields means?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Tue Apr 03, 2007 12:44 pm    Post subject: What does Unpacking all packed fields means?
Reply with quote

I have a requirement:

We were NDM'ing one file to a location which will be FTPed now.

My Onsite guy says, before doing this we need to unpack the file as this is the requirement, he wrote to me:

"However, first we have to expand the file lrecl by unpacking all packed fields. This can be done via a program or the IEBGENER utility."

Please could someone tell me what does he mean by this.


The file format goes like this:

010............ .? .
020 01.........X290075000 000000000000610270
020 01.......??P363347000 000000000009804270
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 03, 2007 12:56 pm    Post subject:
Reply with quote

Basically the pack fields use the two half bytes to store numeric data, if you browse a file you may see what appears to be a lot of garbled rubbish

but if you type "HEX" on the command line you will see something like
Code:

&^..
4630
2119


So when you unpack it you are taking the value stored in each half byte and transforming it into displayable data, with each character taking a full byte. So by unpacking the data instead of seeing &^.. you would see 42613109
Back to top
View user's profile Send private message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Tue Apr 03, 2007 1:10 pm    Post subject:
Reply with quote

Thanks man....

But tell me one thing do we require a program to do that?

...And what is the IEBGENER utility my onsite guy is talking about...I mean how can we use it.

How will it happen...is what I want to know.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 03, 2007 1:13 pm    Post subject:
Reply with quote

You need something to reformat the data. I've never used IEBGENER to do it, but that doesn't mean that it will not work with IEBGENER. I'd be interested in finding out too.

IEBGENER is contained in the "UTILITIES" manual which you can view by clicking on the "Manuals" link at the top of this page.
Back to top
View user's profile Send private message
sri.mainframes

New User


Joined: 16 Feb 2006
Posts: 29
Location: MUMBAI

PostPosted: Tue Apr 03, 2007 1:31 pm    Post subject:
Reply with quote

Hi Shitij,

write a COBOl program to unpack the data.

say input record has 80 LRECL and you need to unpack the data from 7th position to 14th posotion of a record in a file.
in out-rec layout declare the 3rd filed as numeric like 9(14)

read the input-record one by one and move it to the output-record
MOVE IN-REC(1:6) TO OUT-REC(1:6)
MOVE IN-REC(7:7) TO OUT-REC(7:14)
MOVE IN-REC(14:66) TO OUT-REC(21:66)
WRITE OUTFILE

try this and let me know the result.

Thanks
Sri.Prince
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 03, 2007 1:42 pm    Post subject:
Reply with quote

Why write a program when IEBGENER does it already ?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Apr 03, 2007 3:17 pm    Post subject:
Reply with quote

Hi There,

You can also use sort for this
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 03, 2007 9:06 pm    Post subject:
Reply with quote

Hello,

Is this something that will be ongoing rather than a one-time shot?

For an ongoing requirement, i'd recommend creating a copy book of the original and the new format files and use them in a simple COBOL program.

Moving old-field to new-field is [b]much/b] more readable than lengths and displacements (regardless of which utility is used). Also, when the record layout changes, the work required to accomodate the new format(s) is trivial w/ copybooks. If the utility job has many fields and the change is "early" in the record, all of the displacements need to be changed which will waste time and be prone to errors and extra debugging.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am


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