View previous topic :: View next topic
|
Author |
Message |
harithb
New User
Joined: 08 Jun 2009 Posts: 15 Location: Bangalore
|
|
|
|
Hi,
I have a PL/I program which has one input file and one output file. Initially this program had logic to query DB2 table and based on the results from the query an output file had to be created.
Now we have a new requirement where we need to update an IMS database also in the same program. I included the steps for the same but when running the program it is abending with U0476.
I have put the PUT SKIP LIST statements in all the procs and see that everything related to IMS proc is working fine and is updating the IMS database correctly.
The abend is occurring when the trailer record of the file is being written. This is the last proc which is being executed in the program.
WRITE_SP_RECORD: PROC REORDER;
/**********************************************************/
/* WRITE A CFRF01O_RECORD_SP */
/**********************************************************/
PUT SKIP LIST ('INSIDE WRITE_SP ');
WRITE FILE(CFRF01O) FROM (CFRF01O_RECORD_SP);
OUTPUT_COUNTER = OUTPUT_COUNTER + 1;
PUT SKIP LIST ('AFTER WRITE_SP ');
END WRITE_SP_RECORD;
It is displaying the message INSIDE WRITE_SP but not displaying the message after the write statement. Also, I checked the output file but it doesn't have the trailer record.
Please let me know what might be the possible reason for this. Thank you! |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
The fact that you can't see either the PUT SKIP after the write or the record in the file is probably because both are still in buffers at the time of the abend. The abend is likely happening some time after this section of code.
U0476 is a programmed user abend. There is an IMS U0476 documented and the fact that you have added IMS processing would suggest that this additional processing is causing the abend. Have you some IMS processing after WRITE_SP_RECORD: ?
Code: |
0476
Explanation: A DL/I call does not include a valid PCB address. The PCB
address in the DL/I call (second parameter or third, if count is the first
parameter) is not one of the PCB addresses passed to the application
program at its entry point.
Some possible causes for this failure are:
o An address for an AIB was provided but the first eight bytes of the
block do not equal 'DFSAIB'.
o The PSB language specified is not the same as that of the application
program.
o The call requires a PCB address, but the function is the last entry in
the call list.
o The address of the PCB in the call is not one of the PCB addresses
passed to the application at its entry point.
o An online program issued an UNLD call. The UNLD call is an internal
DL/I call and should never be issued by an application program.
This abend can be the result of an improperly assembled or generated
application program.
System Action: The application program terminates abnormally.
Programmer Response: Correct the parameter list and resubmit the job.
o Change the PSB language specified to that of the application program.
o Correct the application program DL/I call statements.
Problem Determination: 4, 17d
|
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Also see my reply to your post in the COBOL section. You did not ned to repost - a moderator would have moved it. |
|
Back to top |
|
|
harithb
New User
Joined: 08 Jun 2009 Posts: 15 Location: Bangalore
|
|
|
|
Hi Garry.
There is no IMS processing after this WRITE_SP_RECORD proc.
Hi Nic,
I didnt know about it. Thats why I reposted it in this forum. Sorry for the trouble. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
If this is a trailer record, you could (for example) close the file after the write to cause the buffer to be flushed. Also, repeat the PUT SKIP that's after the write (as Nic suggested - Hi Nic!) so that at least one gets flushed to output.
What other processing, if any, happens after WRITE_SP_RECORD?
Garry. |
|
Back to top |
|
|
harithb
New User
Joined: 08 Jun 2009 Posts: 15 Location: Bangalore
|
|
|
|
Hi All,
Found out the issue. The problem was coming as we missed initializing some of the fields in the INIT section of the program.
Thanks for all your help.
Regards,
Haritha. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
harithb wrote: |
Found out the issue. The problem was coming as we missed initializing some of the fields in the INIT section of the program. |
Please elaborate on this! |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
As far as I am aware PL/1 programs do not have sections - let alone INIT sections. Of course, things may have changed in the last 3 years. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Nic Clouston wrote: |
As far as I am aware PL/1 programs do not have sections - let alone INIT sections. Of course, things may have changed in the last 3 years. |
My guess, Nic, is that the TS means "init procedure"....
Garry. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Hi Garry,
That is what I was thinking but, as is often stated here, correct terminology is vital in order to get your message across succinctly. |
|
Back to top |
|
|
harithb
New User
Joined: 08 Jun 2009 Posts: 15 Location: Bangalore
|
|
|
|
What I meant was that we missed initializing some of the fields in the proc where all the initializations were being done. Sorry for the confusion ! |
|
Back to top |
|
|
|