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
 

 

Readable value into Packed decimal Value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sathiyendran.erulan

New User


Joined: 04 Mar 2009
Posts: 11
Location: chennai

PostPosted: Wed Dec 09, 2009 4:42 pm    Post subject: Readable value into Packed decimal Value
Reply with quote

Input file layout:
01 gruop
05 gr-name pic x(6).
05 gr-no pic s9(4) comp-3.

Input file:
----------
sathya10
niyama11
leksha12

Now i want that read the gr-no from the input file and stored to output file in the format of packed decimal.

output file should be:
sathya$$
niyama$$
leksha$$

Note : $$ is gr-no value of the input file in packed decimal format. when we verify the data with copy book it should be same.

I used the code as :
sort fields=copy
inrec fields=(1:1:06,07:07,04,to=pd,length=02)

I m not getting the correct value using the above code.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Dec 09, 2009 9:55 pm    Post subject:
Reply with quote

Hello,

The data posted does not match the file definition. . .

The layout mentions comp-3 but the data is zoned. . .
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: Wed Dec 09, 2009 11:40 pm    Post subject:
Reply with quote

Quote:
Now i want that read the gr-no from the input file and stored to output file in the format of packed decimal.


According to your layout, the gr-no is a 3-byte PD value. Is that really the case?

If you want to go from a 3-byte PD value to a 2-byte PD value, you would use:

7,3,PD,TO=PD,LENGTH=2

If you want something else, you need to show the correct input layout and expected output layout.
Back to top
View user's profile Send private message
sathiyendran.erulan

New User


Joined: 04 Mar 2009
Posts: 11
Location: chennai

PostPosted: Thu Dec 10, 2009 10:43 am    Post subject: Reply to: Readable value into Packed decimal Value
Reply with quote

The gr-no is s9(4) usage comp.I fetched the data through spufi and using that spufi file as my input file. When we look into the spufi it should be readble format.
I read that data for that field and stored into converted format(that is output file). When i give the output file to the corressponding copy book it does not match the value when using the above mentioned code.

So the intension is that comp value needs to converted into non-readble format to the output file. For verfication we gave the output file to the copy book it will show the proper value ( as it is taken from the spufi)

How can i convert the comp value into non-readble format ?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 10, 2009 8:12 pm    Post subject:
Reply with quote

Hello,

Quote:
comp value needs to converted into non-readble format
Code:
01 gruop
   05 gr-name pic x(6).
   05 gr-no pic s9(4) comp-3.
So, which is it - comp or comp-3? It realy, really does matter. . .

Also, how would you describe a "non-readble format"?

It will probably help if you show the sample data (input and output) in hex rather than what has been posted.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Thu Dec 10, 2009 8:13 pm    Post subject:
Reply with quote

sathiyendran.erulan wrote:
comp value needs to converted into non-readble format


floating point??
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 Dec 10, 2009 11:24 pm    Post subject:
Reply with quote

sathiyendran.erulan,

You have described your "requirement" in such a confusing and contradictory way that nobody can help you.

As I said in my previous post:

Quote:
If you want something else, you need to show the correct input layout and expected output layout.


If you can't do that, then nobody can help you since we don't understand what it is you're trying to do.
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 Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Convert Hex to readable format. harpreet_Saini19 DFSORT/ICETOOL 7 Wed Sep 14, 2016 5:46 am


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