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

Pack the existing unpacked values using SYNCSORT


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

New User


Joined: 27 Nov 2008
Posts: 37
Location: Cochin

PostPosted: Wed Feb 25, 2009 4:22 pm
Reply with quote

Hi,

I have a file with a field with length 3 bytes (starting position 2). The values in the file for this field is in unpacked format.

My need is to pack (comp-3 format) the values of the above field.

Thanks
Sumu
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Feb 25, 2009 4:44 pm
Reply with quote

sumueng,

Post a few sample input records and the expected output out of it. Also the LRECL/RECFM etc.
Back to top
View user's profile Send private message
sumueng

New User


Joined: 27 Nov 2008
Posts: 37
Location: Cochin

PostPosted: Wed Feb 25, 2009 5:34 pm
Reply with quote

Sample input record

C1390000228
C1390000229

I need to pack the above values 228 and 229 in packed Zoned decimal format

Start position of above values of field is 9 and length is 3
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Feb 25, 2009 5:53 pm
Reply with quote

Quote:
I need to pack the above values 228 and 229 in packed Zoned decimal format
I dont understand what you meant by this. I am not aware of packed zoned decimal format. Are you trying to convert a ZD field to PD? Or is it something else.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Feb 25, 2009 11:16 pm
Reply with quote

Hello,

Quote:
packed Zoned decimal format
There is no such data type. There is zoned-decimal and packed-decimal.

Post the output (in hex) you want from the input you posted.
Back to top
View user's profile Send private message
sumueng

New User


Joined: 27 Nov 2008
Posts: 37
Location: Cochin

PostPosted: Thu Feb 26, 2009 1:54 pm
Reply with quote

I am sorry. it was mispelled. I meant to say packed decimal

Sample input record

C1390000228
C1390000229

I need to pack the above values 228 and 229 in Packed Decimal Format (Comp-3) using SORT card
Start position of above values of field is 9 and length is 3

The output (in hex) for the above input records

C1390000228
CFFFFFFFFFF4444
313900002280000

C1390000229
CFFFFFFFFFF4444
313900002290000
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Feb 26, 2009 3:56 pm
Reply with quote

sumueng,

You can use the TO=PD option to convert the ZD field to PD.
Code:
 OPTION COPY
 OUTREC BUILD=(1,8,9,3,ZD,TO=PD,LENGTH=2)
Back to top
View user's profile Send private message
sumueng

New User


Joined: 27 Nov 2008
Posts: 37
Location: Cochin

PostPosted: Thu Feb 26, 2009 4:06 pm
Reply with quote

Thanks for the Tip

Regarding the parameters 9 and 3 denotes starting position and length 3, Btw what is 1 and 8 indicate here.

let me know
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Feb 26, 2009 4:57 pm
Reply with quote

It's the first 8 characters in your input file and has nothing to do with the PD conversion. You can modify the card as per your output layout.
Back to top
View user's profile Send private message
sumueng

New User


Joined: 27 Nov 2008
Posts: 37
Location: Cochin

PostPosted: Thu Feb 26, 2009 6:00 pm
Reply with quote

Thnaks. it worked fine
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top