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 recognize charater '-' to the sign '-'(negative)

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

New User


Joined: 07 Mar 2007
Posts: 2
Location: Karnataka

PostPosted: Sun May 11, 2008 12:01 pm    Post subject: How to recognize charater '-' to the sign '-'(negative)
Reply with quote

Hi,

In field 1, I have the character PIC X(1) VALUE '-'. In field 2, I have PIC 9(10).
Now I want to read this field 1 and 2 togetehr as a signed field.

eg. Field 1 : -
Field 2 : 4750

I want to read this as -4750 so that i can use it to SUM fields in SORT card.
If I include the field 1 & 2 for SUM FIELDS, it is not taking the character '-' as negative sign.

Please advise.

TIA,
San
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: Sun May 11, 2008 5:35 pm    Post subject:
Reply with quote

How do you have the field defined?
Have you looked at the SFF format?
Back to top
View user's profile Send private message
santhoshi_csv

New User


Joined: 07 Mar 2007
Posts: 2
Location: Karnataka

PostPosted: Sun May 11, 2008 5:57 pm    Post subject:
Reply with quote

I have to look at SFF yet.
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: Mon May 12, 2008 5:17 am    Post subject:
Reply with quote

San,

You can use the technique described in the "Sum a number with a decimal point" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

SFF will work for values like -4750.
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 Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Negative value used in IFTHEN jacobdng DFSORT/ICETOOL 3 Tue Aug 04, 2015 2:12 pm
No new posts IGZ0040S An invalid separate sign was... kishpra COBOL Programming 13 Sun Aug 02, 2015 2:41 am
No new posts Does FUNCTION NUMVAL work for alphanu... Venkata Ramayya COBOL Programming 8 Fri Mar 20, 2015 10:43 pm
No new posts How to modify the value using the sig... Vinay Pushpala PL/I & Assembler 3 Fri Feb 13, 2015 2:10 pm


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