Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
display the sign only if the value is negative

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: display the sign only if the value is negative
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    Post subject: Reply to: display the sign only if the value is negative
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: 2484
Location: NY,USA

PostPosted: Wed Oct 04, 2017 7:44 pm    Post subject:
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: 2418
Location: Hampshire, UK

PostPosted: Wed Oct 04, 2017 9:05 pm    Post subject:
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    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 Unable to display comp variable shub2204 COBOL Programming 4 Fri Oct 02, 2020 7:05 pm
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL jzhardy COBOL Programming 6 Sat Sep 26, 2020 11:32 am
No new posts CA7 Negative dependency JOB=/ Dave Hinds CA Products 0 Thu Sep 10, 2020 7:36 pm
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE RIGICDS32 COBOL Programming 3 Wed Jun 24, 2020 5:49 pm
No new posts Typing the CENT sign ยข on mainframe,... Rod Hittle All Other Mainframe Topics 2 Wed Apr 15, 2020 7:06 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us