Many thanks to Robert, Jon and David!! It's now working thanks to your
help...
> -----Original Message-----
> From: Robert Mills [SMTP:[log in to unmask]]
> Sent: Thursday, September 20, 2001 9:29 AM
> To: [log in to unmask]
> Subject: Re: [HP3000-L] Command File Error Trap
>
> Or Denise could do the following (which I think is more readable):
>
> IF PROGVAR = "E" OR PROGVAR = "e"
> ECHO PLEASE INPUT THE DFID NUMBER
> INPUT DFIDNUM
> if finfo('O!DFIDNUM.OUT.HPSPOOL','exists') then
> PRINT O!DFIDNUM.OUT.HPSPOOL
> SETVAR DMERR = CIERR
> SETVAR DUMMY ' '
> WHILE DUMMY <> 'X' AND DUMMY <> 'x' DO
> INPUT DUMMY, 'PRESS X TO CONTINUE...',,1
>
> ENDWHILE
> ELSE
> ECHO NON-EXISTENT FILE - TRY AGAIN
> ENDIF
> ENDIF
>
> regards,
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> |Robert W.Mills (Systems Development Manager) |
> |Windsong Services, St. Mary Cray, ENGLAND |
> |Tel : +44 (0)1689 870622 x3005 |
> |Fax : +44 (0)1689 899026 |
> |Email: [log in to unmask] |
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
> -----Original Message-----
> From: Jonathan M. Backus [mailto:[log in to unmask]]
> Sent: 20 September 2001 14:16
> To: [log in to unmask]
> Subject: Re: Command File Error Trap
>
>
> Denise,
>
> You need to have a CONTINUE before the LISTF command so the
> command
> file
> doesn't abort, but rather it continues on to your error checking routine.
>
> Thanx,
> Jonathan (Jon) M. Backus, MPE-CSM ~ President
> Tech Group ~ 15 Catawba Place ~ Hagerstown, MD ~ 21742-6515
> Email: [log in to unmask] ~ AIM: JMBackus
> Vmail: 301.988.0614 ~ Fmail: 301.714.1854
> Web: www.TechGroupMD.com
>
>
> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
> Behalf Of Denise Mitchell
> Sent: Thursday, September 20, 2001 9:15 AM
> To: [log in to unmask]
> Subject: Command File Error Trap
>
>
> Morning Folks -
>
> I give up - I'm sure it's something that this brain is just not seeing..
>
> I have a command file. The user enters in the dfid number of a spoolfile.
> If it's there, it displays correctly. If it is not there, the command
> file
> aborts. How do I 'trap' the fact that the file does not exist and 'start
> over'.
>
> TIA
> denise
>
>
> IF PROGVAR = "E" OR PROGVAR = "e"
> ECHO PLEASE INPUT THE DFID NUMBER
> INPUT DFIDNUM
> LISTF O!DFIDNUM.OUT.HPSPOOL,0
>
> IF CIERR <> 0
> ECHO NON-EXISTENT FILE - TRY AGAIN
> ELSE
> PRINT O!DFIDNUM.OUT.HPSPOOL
> SETVAR DMERR = CIERR
> SETVAR DUMMY ' '
> WHILE DUMMY <> 'X' AND DUMMY <> 'x' DO
> INPUT DUMMY, 'PRESS X TO CONTINUE...',,1
>
> ENDWHILE
> ENDIF
> ENDIF
>
> Denise Mitchell
> AB&C Group
> 304-725-7050 x 262
> "A dog wags his tail with his heart." - Mark Buxbaum
>
> * 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 *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|