View previous topic :: View next topic
|
Author |
Message |
ponkala
New User
Joined: 04 Aug 2008 Posts: 6 Location: chennai
|
|
|
|
In Pl/1 while opening the file i might get various file errors. How to handle those errors
For Ex: In COBOL if i handle file status not equal to zero then we can identify there is an error occured while opening. How to identify the same in PL/1?
We have the same error for READ,WRITE,LOCATE(SET) also.How to handle? |
|
Back to top |
|
|
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
using ON.
You have something like ON ERROR, ON CODE etc... you can use them for file handling |
|
Back to top |
|
|
ponkala
New User
Joined: 04 Aug 2008 Posts: 6 Location: chennai
|
|
|
|
Thanks for your replay.
But,ON CODE,ON SIZE ERROR, .. these are all done in COBOL.
I want to solve the problem in PL/1.Could you help me to solve it? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
ponkala: ON is a PL/I construct. Read the Language Reference manual from the link at the top of the page and you'll find the ON units in PL/I refer in turn to an entire chapter on the different conditionals that can be intercepted -- ENDFILE, CONVERSION, KEY, SIZE being among them. |
|
Back to top |
|
|
ponkala
New User
Joined: 04 Aug 2008 Posts: 6 Location: chennai
|
|
|
|
Thanks Robert.
I solved that problem. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
ponkala -- great to hear! |
|
Back to top |
|
|
|