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
 

 

Pack the existing unpacked values using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Pack the existing unpacked values using SYNCSORT
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: 2238
Location: @my desk

PostPosted: Wed Feb 25, 2009 4:44 pm    Post subject:
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    Post subject: Reply to: Pack the existing unpacked values using SYNCSORT
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: 2238
Location: @my desk

PostPosted: Wed Feb 25, 2009 5:53 pm    Post subject:
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

Site Director


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

PostPosted: Wed Feb 25, 2009 11:16 pm    Post subject:
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    Post subject: Reply to: Pack the existing unpacked values using SYNCSORT
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: 2238
Location: @my desk

PostPosted: Thu Feb 26, 2009 3:56 pm    Post subject:
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    Post subject: Reply to: Pack the existing unpacked values using SYNCSORT
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: 2238
Location: @my desk

PostPosted: Thu Feb 26, 2009 4:57 pm    Post subject:
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    Post subject: Reply to: Pack the existing unpacked values using SYNCSORT
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    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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm


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