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 *
|