View previous topic :: View next topic |
Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Tue Jan 29, 2008 5:03 am Post subject: PL1 questions |
|
|
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
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.
Please help me out the solution to the two problems. |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue Jan 29, 2008 5:14 am Post subject: |
|
|
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 |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Tue Jan 29, 2008 5:22 am Post subject: |
|
|
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 |
|
 |
|
|