- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting...
Operating System - OpenVMS
1752782
Members
6318
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2009 03:55 PM
тАО08-18-2009 03:55 PM
Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency
More than likely this is due to a mismatched nesting structure somewhere between your GOTO and the target label.
A simple check for consistency in your IF-THEN-ELSE-ENDIF structures is to use SEARCH:
$ SEARCH your-procedure "IF","THEN","ELSE","ENDIF"
If you're disciplined with indentation, a mismatched block should be fairly easy to spot.
Something to watch out for is the absence of a leading "$" in the lines containing your structure verbs. For example:
$ IF condition
$ THEN
$ command
$ ENDIF
is correct, but
$ IF condition
THEN
$ command
$ ENDIF
(note missing "$" on the "THEN" verb) will fail with INVIFNEST.
A simple check for consistency in your IF-THEN-ELSE-ENDIF structures is to use SEARCH:
$ SEARCH your-procedure "IF","THEN","ELSE","ENDIF"
If you're disciplined with indentation, a mismatched block should be fairly easy to spot.
Something to watch out for is the absence of a leading "$" in the lines containing your structure verbs. For example:
$ IF condition
$ THEN
$ command
$ ENDIF
is correct, but
$ IF condition
THEN
$ command
$ ENDIF
(note missing "$" on the "THEN" verb) will fail with INVIFNEST.
A crucible of informative mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2009 09:42 PM
тАО08-18-2009 09:42 PM
Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency
It might also be that there's a faulty construct somewhere between your IF statement and the label that you are going to.
I can't recall what the DCL parser does in the way of skipping over subroutines and I only vaguely recall that it searches forward for a statement label and then if not found, it wraps back to the start - or has this changed??
Do you, for example, have a SUBROUTINE statement without an ENDSUBROUTINE?
The DCL_CHECK.COM utility mentioned by someone else above should be able to identify these problems. (Their name has disappeared so I can't identify them without some effort.)
By the way, how is your code going to LOOP_DISK: when it has an error condition rather than a warning ? Have you said ON ERROR THEN CONTINUE ?
I can't recall what the DCL parser does in the way of skipping over subroutines and I only vaguely recall that it searches forward for a statement label and then if not found, it wraps back to the start - or has this changed??
Do you, for example, have a SUBROUTINE statement without an ENDSUBROUTINE?
The DCL_CHECK.COM utility mentioned by someone else above should be able to identify these problems. (Their name has disappeared so I can't identify them without some effort.)
By the way, how is your code going to LOOP_DISK: when it has an error condition rather than a warning ? Have you said ON ERROR THEN CONTINUE ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-19-2009 10:06 PM
тАО08-19-2009 10:06 PM
Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency
Thanks for all suggestions. These was an extra endif in between GOTO and LOOP_DISK. I removed it and now script is working fine.
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP