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 pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
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


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