Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
sathyajes

New User

Joined: 02 Mar 2006
Posts: 24
Location: Chennai

 Posted: Tue Apr 07, 2009 10:22 am    Post subject: Supressing of Trailing Zeroes after Decimal Point Hi, I am woring on PL/I. I have a requirement to supress the trailing zeroes after the decimal Point. But, I could able to supress only the leading Zeroes of fractional part and not in the Decimal Part. Example : 0000125.9000 My desired result : 125.9 But, I could able to get only 125.9000 Please help me in the syntax. Thanks, Sathya.

bauer

New User

Joined: 03 Mar 2009
Posts: 28
Location: germany

Posted: Wed Apr 08, 2009 11:59 am    Post subject:

Try this:

 Code: TEST:   PROC  OPTIONS(MAIN) REORDER  ;   DCL Z DEC FIXED(11,4) AUTO INIT(123.45);   PUT SKIP EDIT(TRIM(CHAR(Z),'0','0'))(A);   END;
sathyajes

New User

Joined: 02 Mar 2006
Posts: 24
Location: Chennai

 Posted: Wed Apr 08, 2009 12:39 pm    Post subject: Reply to: Supressing of Trailing Zeroes after Decimal Point Hi Bauer, It worked , thanks a lot for your timely reply. It was driving us crazy... With Regds, Sathya.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am How to group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us