<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193771#M42701</link>
    <description>It might also be that there's a faulty construct somewhere between your IF statement and the label that you are going to.&lt;BR /&gt;&lt;BR /&gt;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?? &lt;BR /&gt;&lt;BR /&gt;Do you, for example, have a SUBROUTINE statement without an ENDSUBROUTINE?  &lt;BR /&gt;&lt;BR /&gt;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.)&lt;BR /&gt;&lt;BR /&gt;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 ?</description>
    <pubDate>Wed, 19 Aug 2009 04:42:35 GMT</pubDate>
    <dc:creator>John McL</dc:creator>
    <dc:date>2009-08-19T04:42:35Z</dc:date>
    <item>
      <title>%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193760#M42690</link>
      <description>Script is &lt;BR /&gt;====&lt;BR /&gt;$ para1 = f$edit(p1,"upcase,trim")&lt;BR /&gt;$ IF ("''para1'" .eqs. "ONLINE") .OR. ("''para1'" .eqs. "1") THEN goto LOOP_DISK&lt;BR /&gt;====&lt;BR /&gt;I am getting the below error message but it is going to LOOP_DISK label. Any idea how i can correct this error message? &lt;BR /&gt;&lt;BR /&gt;%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</description>
      <pubDate>Tue, 18 Aug 2009 07:42:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193760#M42690</guid>
      <dc:creator>Debasis Bhar</dc:creator>
      <dc:date>2009-08-18T07:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193761#M42691</link>
      <description>Hi Debasis Bhar&lt;BR /&gt;&lt;BR /&gt;I copied the two lines of code into a commandfile and executed it without any error message. The two lines are correct (only a label loop_disk is missing).&lt;BR /&gt;&lt;BR /&gt;Is this the whole script? Can you supply the rest of the script&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Geni</description>
      <pubDate>Tue, 18 Aug 2009 07:56:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193761#M42691</guid>
      <dc:creator>Heinz W Genhart</dc:creator>
      <dc:date>2009-08-18T07:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193762#M42692</link>
      <description>here is the error message in set verify mode.. p1 is online..&lt;BR /&gt;&lt;BR /&gt;$ para1 = f$edit(p1,"upcase,trim")&lt;BR /&gt;$ IF ("ONLINE" .eqs. "ONLINE") .OR. ("ONLINE" .eqs. "1") THEN goto LOOP_DISK&lt;BR /&gt;%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency&lt;BR /&gt;$ LOOP_DISK:&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Aug 2009 08:46:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193762#M42692</guid>
      <dc:creator>Debasis Bhar</dc:creator>
      <dc:date>2009-08-18T08:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193763#M42693</link>
      <description>The error is likely in one of the lines you haven't shown.&lt;BR /&gt;&lt;BR /&gt;$ @T&lt;BR /&gt;$ IF 1 then goto a&lt;BR /&gt;%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency&lt;BR /&gt;$ a: exit&lt;BR /&gt;&lt;BR /&gt;$ type t.com&lt;BR /&gt;&lt;BR /&gt;$ IF 1 then goto a&lt;BR /&gt;$ endif ! Pointless endif&lt;BR /&gt;$ a: exit</description>
      <pubDate>Tue, 18 Aug 2009 08:55:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193763#M42693</guid>
      <dc:creator>Richard Brodie_1</dc:creator>
      <dc:date>2009-08-18T08:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193764#M42694</link>
      <description>Debasis Bhar,&lt;BR /&gt;&lt;BR /&gt;Is it possible that by taking the branch (goto LOOP_DISK) you're jumping out of or into an IF-THEN-ELSE-ENDIF construction?&lt;BR /&gt;&lt;BR /&gt;I've copied your snippet of DCL-code, added 4 lines:&lt;BR /&gt;&lt;BR /&gt;$ ENDIF&lt;BR /&gt;$ EXIT&lt;BR /&gt;$LOOP_DISK:&lt;BR /&gt;$ write sys$output "Reached LOOP_DISK"&lt;BR /&gt;&lt;BR /&gt;and then by executing this procedure, I get the "invalid IF-THEN-ELSE".&lt;BR /&gt;If I remove the "$ ENDIF" line, all is well.&lt;BR /&gt;&lt;BR /&gt;So, I suggest you check the line between the "goto LOOP_DISK" and the LOOP_DISK label for ill-constructed IF-THEN-ELSE-ENDIFs.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kris (aka Qkcl)&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Aug 2009 09:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193764#M42694</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2009-08-18T09:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193765#M42695</link>
      <description>In searching for a label, DCL will do the comparison in IF statements and only check the codepath that conforms the outcome. If you jump out of, or into a IF_THEN_ELSE_ENDIF block, it could cause this and other problems. &lt;BR /&gt;Quite likely this is caused by a coding error.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Aug 2009 10:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193765#M42695</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-08-18T10:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193766#M42696</link>
      <description>Debasis Bhar,&lt;BR /&gt;&lt;BR /&gt;I have not (yet) seen enough of the script to have a definite answer, but my guess would be infamiliarity with DCL history.&lt;BR /&gt;&lt;BR /&gt;Once there was only the following construct:&lt;BR /&gt;&lt;BR /&gt;$ IF condition THEN command&lt;BR /&gt;&lt;BR /&gt;Most often "command" was something more then a single statement, and the only ways to achieve that were GOTO label, or @&lt;OTHER command="" file=""&gt;&lt;BR /&gt;&lt;BR /&gt;When IF .. THEN &lt;SEVERAL commands=""&gt; [possible ELSE]  was introduced, as always VMS engineering was NOT to break existing code, so, the old construct had to be retained.&lt;BR /&gt;&lt;BR /&gt;The "trick" they used was to add pseudo-commands:&lt;BR /&gt;$ THEN&lt;BR /&gt;which allowes for, but does not require&lt;BR /&gt;$ ELSE&lt;BR /&gt;and had to be ended by &lt;BR /&gt;$ ENDIF&lt;BR /&gt;&lt;BR /&gt;So, now there are TWO different IF constructs:&lt;BR /&gt;&lt;BR /&gt;$ IF condition THEN command&lt;BR /&gt;&lt;BR /&gt;( notice:  NO !!!  ENDIF  )&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;$ IF condition&lt;BR /&gt;$ THEN&lt;BR /&gt;&amp;lt; commands &amp;gt;&lt;BR /&gt;[ $ ELSE&lt;BR /&gt;  &amp;lt; other commands &amp;gt; ]&lt;BR /&gt;$ ENDIF&lt;BR /&gt;&lt;BR /&gt;In the second construct only &lt;COMMANDS&gt; may themselves be IF constructs; although it is considered bad practise to use the first construct within the second.&lt;BR /&gt;&lt;BR /&gt;My guess is that you used the first construct, but still used $ ENDIF&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe&lt;/COMMANDS&gt;&lt;/SEVERAL&gt;&lt;/OTHER&gt;</description>
      <pubDate>Tue, 18 Aug 2009 14:23:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193766#M42696</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2009-08-18T14:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193767#M42697</link>
      <description>Turn on procedure verification, invoke the procedure, and count the numbers of times you've entered a multi-line IF and the numbers of times you've exited a block via its matching ENDIF.&lt;BR /&gt;&lt;BR /&gt;OpenVMS stinks at this sort of DCL-level tracing; it's often somewhat tedious to find these errors in non-trivial DCL procedure code.  There's unfortunately no visible "nested" count for IF-THEN-ELSE stuff.  Not until you blow out with the INVIFNEST error, that is.&lt;BR /&gt;&lt;BR /&gt;The other approach is the brute-force approach, and involves refactoring and restructuring the code of the DCL procedure.  Of cleaning up the GOSUB and GOTO and CALL and the flow control.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ps: this: &lt;BR /&gt;&lt;BR /&gt;$ IF ("''para1'" .eqs. "ONLINE") .OR. ("''para1'" .eqs. "1") THEN goto LOOP_DISK&lt;BR /&gt;&lt;BR /&gt;can be replaced with this:&lt;BR /&gt;&lt;BR /&gt;$ IF (para1 .eqs. "ONLINE") .OR. (para1 .eqs. "1") THEN goto LOOP_DISK&lt;BR /&gt;&lt;BR /&gt;And I don't know what this DCL code is doing here, but this code really smells like a parser of some sort.   Possibly parsing DCL command output?   And there are better ways to do that than DCL.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Aug 2009 15:00:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193767#M42697</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-08-18T15:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193768#M42698</link>
      <description>When verification is on, the "''para1'" .eqs. "ONLINE" provides more useful debugging information than para1 .eqs. "ONLINE", especially when it isn't equal.&lt;BR /&gt;&lt;BR /&gt;However, when the para1 symbol value contains double quotes the "''para1'" construct does work in the general case.  The := assignment and &amp;amp; substitution have different effects as well.&lt;BR /&gt;&lt;BR /&gt;$ para1 = """this has double quotes"""&lt;BR /&gt;$ para2 = "''para1'"&lt;BR /&gt;%DCL-W-UNDSYM, undefined symbol - check validity and spelling&lt;BR /&gt; \HAS\&lt;BR /&gt;$ para3 = para1&lt;BR /&gt;$ para4 := "''para1'"&lt;BR /&gt;$ para5 = &amp;amp;para1&lt;BR /&gt;$ sho sym para*&lt;BR /&gt;  PARA1 = ""this has double quotes""&lt;BR /&gt;  PARA3 = ""this has double quotes""&lt;BR /&gt;  PARA4 = "THIS HAS DOUBLE QUOTES"&lt;BR /&gt;  PARA5 = "this has double quotes"&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;Getting symbol substitution to work when double quotes are involved is a real pain.</description>
      <pubDate>Tue, 18 Aug 2009 20:24:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193768#M42698</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-08-18T20:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193769#M42699</link>
      <description>Get a copy of Charlie Hammond's DCL checker, written in good old DCL, perhaps from here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.digiater.nl/openvms/freeware/v80/dcl_check/" target="_blank"&gt;http://www.digiater.nl/openvms/freeware/v80/dcl_check/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It's a useful tool to have around and will probably find the problem with your command procedure.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Aug 2009 20:24:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193769#M42699</guid>
      <dc:creator>Graham Burley</dc:creator>
      <dc:date>2009-08-18T20:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193770#M42700</link>
      <description>More than likely this is due to a mismatched nesting structure somewhere between your GOTO and the target label.&lt;BR /&gt;&lt;BR /&gt;A simple check for consistency in your IF-THEN-ELSE-ENDIF structures is to use SEARCH:&lt;BR /&gt;&lt;BR /&gt;$ SEARCH your-procedure "IF","THEN","ELSE","ENDIF"&lt;BR /&gt;&lt;BR /&gt;If you're disciplined with indentation, a mismatched block should be fairly easy to spot.&lt;BR /&gt;&lt;BR /&gt;Something to watch out for is the absence of a leading "$" in the lines containing your structure verbs. For example:&lt;BR /&gt;&lt;BR /&gt;$ IF condition&lt;BR /&gt;$ THEN&lt;BR /&gt;$   command&lt;BR /&gt;$ ENDIF&lt;BR /&gt;&lt;BR /&gt;is correct, but&lt;BR /&gt;&lt;BR /&gt;$ IF condition&lt;BR /&gt;  THEN&lt;BR /&gt;$   command&lt;BR /&gt;$ ENDIF&lt;BR /&gt;&lt;BR /&gt;(note missing "$" on the "THEN" verb) will fail with INVIFNEST.</description>
      <pubDate>Tue, 18 Aug 2009 22:55:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193770#M42700</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-08-18T22:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193771#M42701</link>
      <description>It might also be that there's a faulty construct somewhere between your IF statement and the label that you are going to.&lt;BR /&gt;&lt;BR /&gt;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?? &lt;BR /&gt;&lt;BR /&gt;Do you, for example, have a SUBROUTINE statement without an ENDSUBROUTINE?  &lt;BR /&gt;&lt;BR /&gt;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.)&lt;BR /&gt;&lt;BR /&gt;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 ?</description>
      <pubDate>Wed, 19 Aug 2009 04:42:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193771#M42701</guid>
      <dc:creator>John McL</dc:creator>
      <dc:date>2009-08-19T04:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193772#M42702</link>
      <description>Thanks for all suggestions. These was an extra endif in between GOTO and LOOP_DISK. I removed it and now script is working fine.</description>
      <pubDate>Thu, 20 Aug 2009 05:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-e-invifnest-invalid-if-then-else-nesting-structure-or-data/m-p/5193772#M42702</guid>
      <dc:creator>Debasis Bhar</dc:creator>
      <dc:date>2009-08-20T05:06:49Z</dc:date>
    </item>
  </channel>
</rss>

