Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums 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: 147

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

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

Senior Member


Joined: 21 Sep 2010
Posts: 1827
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: 1932
Location: 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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm

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