The ELSEIF is causing your problem, since an if/endif pair evaluates the
first part (IF) as true - in line 55, it has no need to go into the ELSEIF
section because it was rendered false by evaluating 55 as true.
You probably want it to look like this:
71: ELSE
IF FINFO ("HOUD1.PUB",0) THEN (file exists as in 55)
73 : IF FINFO ("HOUD1.PUB","INTCREATED")=!HPYYYYMMDD THEN
(There is no need to check if the end of file is 0 because it obviously is
since it's not greater than zero, line 59, and I've never seen a negative
record count)
75 : PURGE HOUD1.PUB
76 : BUILD HOUD1.PUB;REC=-80,,F,ASCII;DISC=5000
ENDIF
ENDIF
ENDIF
"Paul H Christidis" <[log in to unmask]> wrote in message
news:a5mh9e0g2b@enews4.newsguy.com...
> Michael,
>
> Line 71 is NOT being evaluated. It is viewed as the 'false' section of
the
> evaluation of line 55. The CI is merely indicating that is skipping the
> statements until the 'endif' that corresponds to line 55 is encountered.
>
> Regards
> Paul Christidis
>
>
>
> 55 : IF FINFO ("HOUD1.PUB",0) THEN
> 56 *** EXPRESSION TRUE
> 57 : IF FINFO ("HOUD1.PUB","INTCREATED")=!HPYYYYMMDD THEN
> 58 *** EXPRESSION TRUE
> 59 : IF FINFO ("HOUD1.PUB",19) > 0 THEN
> 60 *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING ELSEIF/ELSE
> 61 /ENDIF
> 62 : PURGE HOUD2.PUB
> 63 : PURGE HOUD3.PUB
> 64 : COPY HOUD1.PUB,HOUD2.PUB
> 65 : RUN EDITOR.PUB.SYS<HOUDINI2.USERSTR2
> 66 : RUN FTP.ARPA.SYS<HOUDINI3.USERSTR2
> 67 : ENDIF
> 68 *** RESUME EXECUTION OF COMMANDS
> 69 : ENDIF
> 70 :
> 71 : ELSEIF FINFO ("HOUD1.PUB",0) THEN
> 72 *** COMMANDS IGNORED UNTIL MATCHING ENDIF
> 73 : IF FINFO ("HOUD1.PUB","INTCREATED")=!HPYYYYMMDD THEN
> 74 : IF FINFO ("HOUD1.PUB",19) = 0 THEN
> 75 : PURGE HOUD1.PUB
> 76 : BUILD HOUD1.PUB;REC=-80,,F,ASCII;DISC=5000
> 77 : ENDIF
> 78 : ENDIF
> 79 : ENDIF
> 80 *** RESUME EXECUTION OF COMMANDS
>
>
> Why does "IF FINFO ("HOUD1.PUB",0) THEN" prove true on line 55 but false
on
> line 71? (the file does exist, by the way)
>
>
> Thanks,
> Michael
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|