HELPLIB.HLB  —  Ext File Specs, Using  Command File Specification
    If indirect command procedures are used, you may need to put
    quotes around file specifications.

    The following examples show the differences in output between
    TRADITIONAL and EXTENDED parse styles when using the same command
    file, SS.COM:

           $ create ss.com
           $ if p1 .nes. "" then write sys$output "p1 = ",p1
           $ if p2 .nes. "" then write sys$output "p2 = ",p2
           $ if p3 .nes. "" then write sys$output "p3 = ",p3

    o  Setting the parse style to an ODS-2 environment and running
       SS.COM, the following output occurs:

              $ set process/parse_style=traditional
              $ @ss ^ p2 p3
              p1 = ^
              p2 = P2
              p3 = P3

       Note that the circumflex (^) is the first argument, and that
       the case is not preserved for the p2 and p3 variables.

    o  Setting the parse style to an ODS-5 environment, the following
       output occurs when running the same command procedure:

              $ set process/parse_style=extended
              $ @ss ^ p2 p3
              p1 = ^ P2
              p2 = P3

       Note that the command procedure recognizes the circumflex (^)
       as the escape character, and "^ P2" is the first argument.

    o  Adding quotes to the circumflex (^) produces the following
       outcome:

              $ @ss "^" p2 p3
              p1 = ^
              p2 = P2
              p3 = P3

       Because the circumflex (^) is within a quoted string, it is
       not treated as an escape character.

    o  Adding quotes to the p3 variable produces the following
       outcome:

              $ @ss "^" p2 "p3"
              p1 = ^
              p2 = P2
              p3 = p3

       Note that the case is preserved for the p3 variable.

    o  In an ODS-2 environment, the following command treats the
       circumflex (^) and the p2 and p3 strings as arguments, and the
       command procedure produces the following results:

              $ set process/parse_style=traditional
              $ @ss^ p2 p3
              p1 = ^
              p2 = P2
              p3 = P3

    o  In an ODS-5 environment, the circumflex (^) is treated as
       the escape character and DCL looks for the file "SS^_P2.COM",
       which results in the following error:

         $ set process/parse_style=extended
         $ @ss^ p2 p3
        %DCL-E-OPENIN, error opening USER$DISK:[TEST]SS^_P2.COM; as input
        -RMS-E-ACC, ACP file access failed
        -SYSTEM-W-BADFILENAME, bad file name syntax
Additional Information: explode extract
Case Preservation and $FILE Ampersand Versus Apostrophe Substitution
Close Help