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

Conversion help to Packed Decimal


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saranyan_j

New User


Joined: 24 May 2006
Posts: 7

PostPosted: Thu Apr 15, 2010 6:49 pm
Reply with quote

Hi there,

I'd like to ask the experts if there is a way to convert data to packed Decimal

Input record looks liks this.

Code:

ABC+012345.80
CDE-112345.80
ZZZ+000008.05
ZZZ-000008.00


I need the numbers converted into their corresponding Comp 3 format .. The output expected would be as below ( in the hex format )


Code:
--+----1
ABC     
CCC01350
1230248C
--------
CDE     
CCC01350
3451248D
--------
ZZZ    *
EEE00085
9990000C
--------
ZZZ     
EEE00380
9990000D


Is there a standard data format available for +999999.99 which I can use in conversion.

Thanks for your valuable time in advance.

Cheers,
Saran
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 15, 2010 7:16 pm
Reply with quote

UFF and more specifically for you need SFF. Take a look at the following threads:
Adding Fields having datatype ZZ,ZZZ,ZZ9
How to convert the file from X(12) to S9(13)v9(4) COMP-3 var
specific use for SFF and UFF
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Apr 15, 2010 8:46 pm
Reply with quote

Saran,

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC+012345.80
CDE-112345.80
ZZZ+000008.05
ZZZ-000008.00
/*
//SORTOUT DD DSN=...  output file (FB/8)
//SYSIN DD *
  OPTION COPY
  INREC BUILD=(1,3,4,10,SFF,TO=PD,LENGTH=5)
/*


Quote:
Is there a standard data format available for +999999.99 which I can use in conversion.


I don't understand what you're asking here.
Back to top
View user's profile Send private message
saranyan_j

New User


Joined: 24 May 2006
Posts: 7

PostPosted: Fri Apr 16, 2010 1:02 pm
Reply with quote

Dear Frank / CICS guy

Thanks again... It works like a charm...

Quote:
Is there a standard data format available for +999999.99 which I can use in conversion


I was actually looking for SFF and I got my answer !!

Cheers,
Saran
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
Search our Forums:

Back to Top