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
 

 

How to convert pached decimal into decimal format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ramesh burra

New User


Joined: 02 Dec 2006
Posts: 3
Location: Hyderabad

PostPosted: Sun Jan 14, 2007 12:22 pm    Post subject: How to convert pached decimal into decimal format
Reply with quote

Hi All,

I have input file (IN-FILE) which have fields like org,type,application
those are key fields.

01 IN-FILE-REC.
05 IN-ORG PIC S9(03) PACKED DECIMAL.
05 IN-TYPE PIC S9(03) PACKED DECIMAL.
05 IN-APPLICATION PIC S9(13) PACKED DECIMAL.

Those data in the form of packed decimal format means record will take 11 bytes instead of 19 bytes,

read in-file sequentially(those values in the form of packed decimal),
convert into decimal format ,then send it to out-file and sort them

please give me guide line for "how to convert packed decimal value into decimal format'

Thanks®ards,
Burra
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Jan 14, 2007 12:46 pm    Post subject:
Reply with quote

Hi Burra,

You can do this w/sort. If you want that put this in the sort forum. Frank Yaeger will have a solution for you.

But here's a COBOL solution (pseudo code):

01 IN-FILE-REC.
.
.
05 IN-ORG PIC S9(03) PACKED DECIMAL.
05 IN-TYPE PIC S9(03) PACKED DECIMAL.
05 IN-APPLICATION PIC S9(13) PACKED DECIMAL.

01 IT-FILE-REC.
.
.
05 IT-ORG PIC S9(03).
05 IT-TYPE PIC S9(03).
05 IT-APPLICATION PIC S9(13).

perform read-loop until eof

read-loop.
read in-file at end set eof to true
not at end
move corr in-file-rec to ot-file-rec
write ot-rec
end-read
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 convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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