Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
f4search help in DCL Script
Name: Rob Date: December 4, 2003 at 13:39:32 Pacific OS: VAX/VMS 6.X CPU/Ram: MicroVAX
Comment:
I'm trying to pass a var into F$SEARCH. What is wrong with this:
$ FILNAM = "INFOPLUS$ROOT:[SITE.RUNTEST]*.TST" $ T_STR := "is testing" $ T_SP := " " $ SV_FSP := $LOOP_1$ $ FSP = F$SEARCH('FILNAM) $ IF SV_FSP .EQS. "" THEN SV_FSP = FSP $ IF FSP .EQS. SV_FSP THEN GOTO EXIT_LOOP_1 $ TYPE FSP $ SV_FSP = FSP $ GOTO LOOP_1 $EXIT_LOOP_1:
Name: ME Date: December 6, 2003 at 06:54:52 Pacific
Reply:
The single quote in f$search is not necessary, so F$search(filespec) should be sufficient.
0
Response Number 2
Name: ME Date: December 6, 2003 at 07:00:10 Pacific
Reply:
Two other minor changes : - A label should end wit a semicolon, so the label loop_1$ should be loop_1: - you can avoid the use of sv_fsp if you jump straight to the exit_loop_1 label. the loop will look like this :
$ FILNAM = "INFOPLUS$ROOT:[SITE.RUNTEST]*.TST" $LOOP_1: $ FSP = F$SEARCH(FILNAM) $ IF FSP .EQS. "" THEN goto exit_loop_1 $ TYPE FSP $ GOTO LOOP_1 $EXIT_LOOP_1:
0
Response Number 3
Name: lsk55 Date: January 2, 2004 at 19:36:15 Pacific
Reply:
Just because I'm a bit neurotic about such things, I'd prefer it to look like:
$ FILNAM = "INFOPLUS$ROOT:[SITE.RUNTEST]*.TST" $LOOP_1: $ FSP = F$SEARCH(FILNAM) $ IF FSP .NES. "" $ THEN $ TYPE FSP $ GOTO LOOP_1 $ ENDIF $ ...
Of course, TYPE INFOPLUS$ROOT:[SITE.RUNTEST]*.TST will do the same thing. :-)
Summary: I have to write a little DCL script: It can sort the line of a file, which is determined by parameter. If the two lines in the files is similar, the script must send an individual error message. If th...
Summary: Hi, I need a DCL script in VMS to set ent/after a date I want for a queue name "BACKUP_BATCH" and job name "BACKUP". Is any one could help ? :) Tom ...