Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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: 2285
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: 2285
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: 2285
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 How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 0 Wed Nov 22, 2017 10:23 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us