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

Readable value into Packed decimal Value


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Wed Dec 09, 2009 9:55 pm
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Dec 09, 2009 11:40 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Dec 10, 2009 8:12 pm
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: 6966
Location: porcelain throne

PostPosted: Thu Dec 10, 2009 8:13 pm
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Dec 10, 2009 11:24 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top