-ERRANAL
&CNT =0 &LOOP 2 &CNT EQ 12
&IF&RETCODE EQ &CNT &GOTO -FIX&CNT &eNT = &CNT +- 1 -FIXO &GOTO -ALLOK -FIX1 &GOTO -ALLOK -FIX2 &GOTO -ALLOK -FIX 11 -ALLOK When the value of the &CNT variable equals the return code value in &RETCODE, the branch to the corresponding -FIX routine is taken. Each
corrective routine performs different actions, depending on its code,
and finishes at the routine labeled-ALLOK. You can, in some cases, determine the cause of a CMS command error
and attempt to correct it in yourEXEC. To do this, you must know the
return codes issued byVM/310 co •• ands. See for a
discussion of the return codes forVM/310 commands. In addition, the
error messages and corresponding return codes are listed under the
command descriptions for eachCMS command in the As an example, all CMS commands that search for files issue a return
code of 28 when a file is not found. If you want to test for a
file-not-found condition in yourEXEC, you might use statements similar to the following: &CONTROL OFF NOMSG TYPE HELP MEMO A
&IF&RETCODE = 28 &GOTO -NOFILE Tailoring CMS Commands for Your Own Use You can create EXEC procedures that simplify or extend the use of a
particularCMS command. Depending on your applications, you can modify
theCMS command language to suit your needs. You can create EXEC files
that have the same names asCMS commands, and, since CMS locates EXEC files before MODULE files, the EXEC is found first. For example, the COPYFILE command, when used to copy eMS disk files, requires six operands. If you change only the filename when you copy files, you could
create aCOpy EXEC as follows: 302 IBM VM/370 eMS User's Guide
&CNT =
&IF
corrective routine performs different actions, depending on its code,
and finishes at the routine labeled
and attempt to correct it in your
return codes issued by
discussion of the return codes for
error messages and corresponding return codes are listed under the
command descriptions for each
code of 28 when a file is not found. If you want to test for a
file-not-found condition in your
&IF
particular
the
that have the same names as
create a