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
 

 

can i compute a decimal value use dfsort

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

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Thu Apr 10, 2008 5:28 pm    Post subject: can i compute a decimal value use dfsort
Reply with quote

assume i have a input file

input
------
100
200
300

output
-------
-300
-200
-100

how to do that, have any keyword? thx.
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 7:58 pm    Post subject: Reply to: can i compute a decimal value use dfsort
Reply with quote

julian,

You will have to give few more details on your requirement.

topic says

Quote:
can i compute a decimal value use dfsort


but i do not see any decimal point in your output data.

what is this '-' ? if it is a hyphen then you can buid the records with '-' in the first byte followed by the actual data.
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 Apr 10, 2008 9:03 pm    Post subject:
Reply with quote

Quote:
how to do that, have any keyword


How to do what? Your post does NOT explain what you want to do at all. You need to do a better job of explaining what you want to do before anyone can help you.
Back to top
View user's profile Send private message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Fri Apr 11, 2008 7:28 am    Post subject: Reply to: can i compute a decimal value use dfsort
Reply with quote

i am sorry.
for example, there is a AMTY field as following.

input:
Code:
000001   
       10
       0C
---------
000002   
       20
       0C
---------
000003   
       30
       0D


and output is AMTY*(-1)
Code:
000001   
       10
       0D
---------
000002   
       20
       0D
---------
000003   
       30
       0C
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 11, 2008 7:18 pm    Post subject:
Reply with quote

That is even more confusing....
You say you have a 3 byte zoned decimal field in a record and you want the sign reversed into a 4 byte SFF type field?
You are saying that you have a 2 byte packed decimal field in a record and you want the sign reversed into that same 2 byte field?
Please pick one or the other or create your own.......
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: Fri Apr 11, 2008 9:28 pm    Post subject:
Reply with quote

Julian,

I'm still not sure I understand what you want, but assuming you want to reverse the sign of a 2-byte PD value in positions 8-9, you can use these DFSORT control statements:

Code:

   OPTION COPY
   INREC OVERLAY=(8:8,2,PD,MUL,-1,TO=PD,LENGTH=2)
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 DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am


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