IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 151

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: 151

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: 2508
Location: NY,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: 2432
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL View Bookmarks

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Unable to display comp variable COBOL Programming 4
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6
No new posts CA7 Negative dependency JOB=/ CA Products 0
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts Typing the CENT sign ยข on mainframe,... All Other Mainframe Topics 2

Back to Top