MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PL1 questions

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Tue Jan 29, 2008 5:03 am    Post subject: PL1 questions Reply with quote

Hai,

I have two questions:

1.I do not want to handle NOZERODIVIDE condition in the PLI Program and want to proceed ahead like below:
Code:

    DCL A            FIXED DEC (5) INIT (10);                   
    DCL B            FIXED DEC (5) INIT (0);                     
    DCL AVG          FIXED DEC (5) INIT (0);                     
    DCL TODAY        CHAR (05) INIT ('TODAY');                   
    (NOZERODIVIDE):AVG = A / B;                                 
    PUT SKIP LIST('TODAY IS :',TODAY);     

OUTPUT

IBM0301S ONCODE=320  The ZERODIVIDE condition was raised.                       
         From entry point ABCPGM at compile unit offset +000000A8 at entry offset +000000A8 at address 0C100880.                     

I expect the output should come as TODAY IS :TODAY in the spool but the program is abending even though i have given NOZERODIVIDE.



2.I have a program as below:
Code:

    DCL TODAY        CHAR (05) INIT ('TODAY');   
    PUT PAGE LIST('TODAY IS :',TODAY);           

OUTPUT
Code:

                                                                               
TODAY IS :              TODAY                                                   

I expect thge output should come as below whereas i am getting one blank line before the print and PAGE LIST will always print on the top of the page , if that is so why i am getting an additional blank line.
Code:

TODAY IS :              TODAY

Please help me out the solution to the two problems.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Jan 29, 2008 5:14 am    Post subject: Reply with quote

cannot help with the zerodivide except to say I do not ever consider it a good idea to suppress it.

As to the put page - I never use it - I just use PUT SKIP DATA
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Tue Jan 29, 2008 5:22 am    Post subject: Reply with quote

Yadav2005,

You are posting all the basic questions here. You can find answers for all your queries in the PL/I manual.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group