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
 

 

Left Alignment in PL/1.

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

New User


Joined: 25 Jun 2008
Posts: 13
Location: Bangalooru

PostPosted: Fri Jun 27, 2008 4:46 pm    Post subject: Left Alignment in PL/1.
Reply with quote

Hi,

How can I format PIC '999V.99' to left align it in pl/1 ?


for ex: "bbbbb123.45" (b=blank). I want it without blanks & it should be left-aligned.

Please give me the solution.

Ashok.
Back to top
View user's profile Send private message

Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Fri Jun 27, 2008 5:42 pm    Post subject:
Reply with quote

Redefine your variable on a char and use LEFT function on char variable.
Back to top
View user's profile Send private message
Ashokn

New User


Joined: 25 Jun 2008
Posts: 13
Location: Bangalooru

PostPosted: Fri Jun 27, 2008 5:47 pm    Post subject: Left Alignment in PL/1.
Reply with quote

Hi,

DCL LFTALN PIC 'bbbbb123.45'

pls make changes to above statement & how to use LEFT function.Please give me full syntax.

=============================================
Srihari Gonugunta wrote:
Redefine your variable on a char and use LEFT function on char variable.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Fri Jun 27, 2008 6:26 pm    Post subject:
Reply with quote

DCL LFTCHR CHAR(11);
DCL LFTALN PIC 'ZZZZZ999V.99' BASED(ADDR(LFTCHR));
LFTALN=123.45;
LFTCHR=TRIM(LFTCHR,' ');
PUT SKIP LIST('LFTCHR : ',LFTCHR);

Hope this helps
Back to top
View user's profile Send private message
Ashokn

New User


Joined: 25 Jun 2008
Posts: 13
Location: Bangalooru

PostPosted: Tue Jul 01, 2008 3:55 pm    Post subject: Left Alignment in PL/1.
Reply with quote

Hello Sir,

I compiled below PL/1 program(of LeftAlign) but I'm getting below error:

ERROR 1 SEVERITY 3 on or near line 3 of file "test.wrk"

The source text contains extraneous data. Check for excess

END statements, unbalanced quotes, and unbalanced /* */.
===========================================
Srihari Gonugunta wrote:
DCL LFTCHR CHAR(11);
DCL LFTALN PIC 'ZZZZZ999V.99' BASED(ADDR(LFTCHR));
LFTALN=123.45;
LFTCHR=TRIM(LFTCHR,' ');
PUT SKIP LIST('LFTCHR : ',LFTCHR);

Hope this helps
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 Coverting PD to FS and also left just... Atul Banke DFSORT/ICETOOL 6 Wed Aug 24, 2016 4:31 pm
No new posts Zero suppress and shift left Bryant Shearin DFSORT/ICETOOL 10 Sat Oct 31, 2015 9:28 pm
No new posts Mailing PS dataset - Improper Alignme... Anitha Mohan JCL & VSAM 10 Mon Jan 05, 2015 1:28 pm
No new posts Proper Decimal alignment when convert... sudhakar_mainframe DFSORT/ICETOOL 6 Wed Jun 04, 2014 7:54 pm
No new posts Cut leading spaces or others and just... Auryn COBOL Programming 4 Fri Oct 25, 2013 7:23 pm


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