View previous topic :: View next topic
|
Author |
Message |
Neeraj Kumar
New User
Joined: 24 Nov 2007 Posts: 7 Location: ABC
|
|
|
|
Hi,
I have a PL/I-IMS program which when I'm running is abending with U0476, in ACCESS_POLICY proc. Please see the program snippet below:
Code: |
IF STATUS = 'V'
THEN
DO ;
PUT SKIP EDIT('IN VOID') (A) ;
CALL ACCESS_POLICY;
END ;
---------------------------------------------
---------------------------------------------
ACCESS_POLICY: PROC;
PUT SKIP EDIT('IN ACCESS_POLICY') (A) ;
PCBPTR = P223001;
SSA_A12345_Q.SSAQOP = 'EQ';
SSA_A12345_Q.SSAQVAL = A00000.LPOL#0 ;
CALL PLITDLI(DLI4,
DLIGU,
PCBPTR,
A12345,
SSA_A12345_Q);
---------------------------------------------
---------------------------------------------
|
Though eventually I fixed it, (It was related to Call Parms), but my question is, even if the program is abending it should display, the very first statement which is just a display, the put skip statement in Spool, but it is not.
I'm new to PL/I, so looking for some explaination here.
Thanks
Neeraj. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Please look at the topic underneath yours in this forum. |
|
Back to top |
|
|
Soumik Das
New User
Joined: 06 Aug 2011 Posts: 25 Location: India
|
|
|
|
Hey Bill..its coming above not underneath... ..don't know why
...and so here it is...
your problem has more to do with checkpoints....just add a the line
Code: |
CLOSE FILE(SYSPRINT); |
at the end of all the PUT SKIP EDITs and you should get all of your diagnostics printed. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes, I should have linked to it (but no time at that time for niceties for people who can't be bothered to look). When there is a new post, the order can change. Still possible to find easily...
It will look weird for anyone reading the stuff later, so go with Soumik's link. Thanks Soumik. |
|
Back to top |
|
|
Soumik Das
New User
Joined: 06 Aug 2011 Posts: 25 Location: India
|
|
|
|
Quote: |
(but no time at that time for niceties for people who can't be bothered to look). |
Yup...but my boss is off sick!!... ..so I guess I can play the samaritan for a while.... |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
In PL/1 you should never open/close SYSPRINT (although you can). SYSPRINT i a system file and can be written to outside of your PL/1 program by the PL/1 environment (this is where your PL/1 program is executed). |
|
Back to top |
|
|
Soumik Das
New User
Joined: 06 Aug 2011 Posts: 25 Location: India
|
|
|
|
Nic Clouston wrote: |
In PL/1 you should never open/close SYSPRINT (although you can). |
Yeah you're right....but judging by his (Neeraj's) PUT statements..it does not look like those diagnostic lines will ever be willingy put to a production stage. It looks more like a test env thingy...and you can get away with almost anything in test....
well as much as I know it has mostly to with the write buffers..and a CLOSE FILE does flush the buffer.....to avoid this scenario we always put our diagnostics out a another file and give it a DDNAME like DIAGPLI (with RECFM=FBA,LRECL=133) etc and direct it to a SYSOUT rather than a DSNAME...it is just adding 2 or 3 more LOCs but it allows us to let the SYSPRINT be undisturbed....
I also wrote an assembler routine a few years ago which used to do in PLI something similar to the fflush function in C. Unfortunately I lost it...
however if you have any better solution..I am all ears |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Much simpler to just write your put skip and then do an R in the line command area. On failure it is the last put skip that does not reach sysout so the first will. Yes, you can have loads of duplicate put skips but you only need to do it at the point of failure so only a few put skips (or one) would be duplicated. |
|
Back to top |
|
|
|