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
 

 

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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm


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