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

How to convert pached decimal into decimal format


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
Search our Forums:

Back to Top