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
 
Supressing of Trailing Zeroes after Decimal Point

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
sathyajes

New User


Joined: 02 Mar 2006
Posts: 24
Location: Chennai

PostPosted: Tue Apr 07, 2009 10:22 am    Post subject: Supressing of Trailing Zeroes after Decimal Point
Reply with quote

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.
Back to top
View user's profile Send private message

bauer

New User


Joined: 03 Mar 2009
Posts: 28
Location: germany

PostPosted: Wed Apr 08, 2009 11:59 am    Post subject:
Reply with quote

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;

Back to top
View user's profile Send private message
sathyajes

New User


Joined: 02 Mar 2006
Posts: 24
Location: Chennai

PostPosted: Wed Apr 08, 2009 12:39 pm    Post subject: Reply to: Supressing of Trailing Zeroes after Decimal Point
Reply with quote

Hi Bauer,

It worked , thanks a lot for your timely reply.
It was driving us crazy...

With Regds,

Sathya.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

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

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