Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 26
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 Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Online Assembler Program Starting point Aditya.Srivastava PL/I & Assembler 4 Fri Jul 08, 2016 6:48 pm
No new posts Convert Decimal to hexadecimal Steve Ironmonger DFSORT/ICETOOL 5 Fri May 27, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. JCL to convert float decimal into rea... polymathtarun JCL & VSAM 3 Sun May 15, 2016 9:57 pm
No new posts conversion from char to packed decimal Musab Ahmed DFSORT/ICETOOL 7 Fri Apr 08, 2016 1:12 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us