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

display the sign only if the value is negative


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
useit

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Wed Oct 04, 2017 5:53 pm
Reply with quote

Hi,
i am subtracting the two values through jcl sort. syntax is something as below. the value is getting subtracted properly but one challenge is i have to display the sign only if the value is negative. if the value is positive i should not display the sign.

12,9,SFF,SUB,32,9,SFF,EDIT=(STTTTTTTT),SIGNS=(+,-)

for example : -20 , -30
20, 30 (if value is positive)

can someone please help me in this?

Regards,
useit
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Wed Oct 04, 2017 6:31 pm
Reply with quote

hi,
below syntax is resolved my issue.

SIGNS(,-)

but i have another challenge in suppressing the leading zeros.

now i am getting 000000010 or -000000010 but it has to be
10 or -10

how can i suppress the leading zeroes through edit pic clause?

Regards,
Useit
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Wed Oct 04, 2017 7:44 pm
Reply with quote

Read
Editing numeric fields
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Oct 04, 2017 9:05 pm
Reply with quote

No such thing as "jcl sort".
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 How to display the leading zeros of a... DB2 7
No new posts SDSF display Max-RC in different colors TSO/ISPF 4
No new posts Negative dependency between jobs in m... COBOL Programming 12
No new posts Negative value - packed field - Natur... Java & MQSeries 0
No new posts Converting a file from PD to display ... SYNCSORT 4
Search our Forums:

Back to Top