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
 
Conversion help to Packed Decimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Conversion help to Packed Decimal
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: 2150
Location: At my coffee table

PostPosted: Thu Apr 15, 2010 7:16 pm    Post subject:
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 Moderator


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

PostPosted: Thu Apr 15, 2010 8:46 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How can I convert charactor to fixed ... liying DFSORT/ICETOOL 7 Tue May 22, 2018 3:35 pm
No new posts How to group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm
No new posts Conversion of DLI update Jobs as BMP ... Gopinath Shanmugam IMS DB/DC 3 Wed Dec 20, 2017 12:02 pm
No new posts Conversion of UTF-8 to EBCDIC muralikrishnan_new COBOL Programming 1 Tue Nov 21, 2017 5:33 pm
No new posts Mainframe Blocks to Tracks conversion upendrasri JCL & VSAM 1 Sat Nov 18, 2017 10:52 am

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