IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PLI ONCODE = 70


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Nov 22, 2007 2:52 pm
Reply with quote

Hi all,
This is the message I have got from SPOOL after running a PLI Program.

Quote:
The ENDFILE condition was raised when the end of an input file was
encountered. There was no ON-unit to handle the ENDFILE condition.
The ERROR condition has been raised.

To prevent the ERROR condition from being raised, add an ON-unit to
handle the ENDFILE condition for each input file used in the program.

The oncode is 0070.


I want to know how to add ON-unit to handle the ENDFILE condition.

Please help me. The program what I have tried is given below.

Quote:
DCL EMPFL FILE RECORD INPUT;
DCL MOREREC BIT(01) INIT('1'B);
DCL NO BIT(01) INIT('0'B);
DCL 01 EMPST,
05 ENO PIC '9999',
05 ENAME PIC 'XXXXXX',
05 ESAL PIC '99999',
05 DEPT PIC 'XX',
05 FILLER CHAR(63);
ON ENDFILE(EMPL) MOREREC = NO;

READ FILE(EMPFL) INTO(EMPST);
DO WHILE(MOREREC);
PUT SKIP LIST(EMPST);
READ FILE(EMPFL) INTO(EMPST);
END;
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Nov 22, 2007 3:14 pm
Reply with quote

Sorry, I found logic error in my program. I got the correct thing.

Quote:
ON ENDFILE(EMPL) MOREREC = NO;


should be

Quote:
ON ENDFILE(EMPFL) MOREREC = NO;


I request the moderator to delete this topic. Sorry for the inconvenience.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts writing into VSAM indexed tabl in PL1... PL/I & Assembler 8
No new posts IBM0472S ONCODE=290 The INVALIDOP PL/I & Assembler 18
No new posts ONCODE=8094 from IRXLOAD CLIST & REXX 8
No new posts Undocumented ONCODE 8843? PL/I & Assembler 2
No new posts PLI RUN MESSAGE:ONCODE=8097 ABENDS & Debugging 5
Search our Forums:

Back to Top