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

missing or extra end statements in pl/I


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

New User


Joined: 05 Nov 2007
Posts: 19
Location: Monterey CA

PostPosted: Sat Jan 19, 2008 4:08 am
Reply with quote

is there an easy way to find missing or extra end; statements? I have a very large program, many procs and many do statements and do loops is there any way to match them up to solve the problem without doing it by hand? TIA, Harvey
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jan 19, 2008 4:25 am
Reply with quote

Hello,

If a compilation does not "flag" them, might they be correct?

If they are syntactically correct, analysis may be needed to determine if they are "good" or not. . .

If i'm way off, please ignore - dain brammage - long week today icon_smile.gif
Back to top
View user's profile Send private message
Harvey Sullivan

New User


Joined: 05 Nov 2007
Posts: 19
Location: Monterey CA

PostPosted: Sat Jan 19, 2008 4:51 am
Reply with quote

Sorry, the compiler does flag it with this:

IBM1861I S All statements other than DECLARE, DEFAULT and PROCEDURE statements must be contained inside a PROCEDURE. Explanation: This message can occur, for instance, if the first PROCEDURE statement is invalid or if a PROCEDURE contains too many END statements.

it flags the last statement of a 2500 statement program. The first procedure statemnt is OK.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Sat Jan 19, 2008 6:27 am
Reply with quote

The compile listing also has BLOCK and DO counters down the left (may be an option. Check if each BLOCK and DO matches with the END you think it should (you did indent properly I hope). If not, you have a problem within that group.
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 Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Find missing sequence for every key DFSORT/ICETOOL 3
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts commands missing in JESMSGLG JCL & VSAM 3
No new posts EDCICONV - Newline are missing All Other Mainframe Topics 6
Search our Forums:

Back to Top