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
 
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 group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm
No new posts Unloading DB2 table in CSV format alo... grvtomar COBOL Programming 7 Sun Jan 28, 2018 2:05 am
No new posts Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm

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