SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-70
Examples of MXGNAMES
$VOL4.ZSDA126A.QDXWG4* &
-- End of table CAT.SCH.T126A ) --
This example prepares a list of file names to be used with TMF. The input is an
SQL table name.
MXGNAMES CAT.SCH.T126A -output=NAMELSTX -TMF
The contents of NAMELSTX are identical to the output file of the second example.
This example uses MXGNAMES with TMF. The input is a list of SQL names with
the file length specified.
MXGNAMES -SQLNames=$VOL1.SQLSTUFF.SQLNAMES -output=NAMELIST -TMF
-length=28000
The above use of the -length option specifies that output files should be limited
to a length of 28000 bytes. If the output exceeds 28000 bytes, the first additional
file generated is called NAMELIS2. If ten output files are needed, the tenth output
file is called NAMELI10.
You can use the file length to allow for additional text to be added to the TMF
command file, in addition to the text generated by MXGNAMES, without exceeding
TMF's 28000 byte limit. The minimum file length allowed is 1000 bytes.
If MXGNAMES generates multiple output files, a duplicate file name error can
occur on one of these files. To avoid duplicates you should:
°
Specify shorter output file names, so that the extra digits can be appended
without overwriting characters from the original name.
°
Avoid using digits in the end of the output file name.
Additional files either do or do not contain comments, depending on whether you
use the -no comment option.
Each continuation file will resume with the very next line of output, whether that line
is a comment or a file location. Other than the opening parenthesis for each new
file, the contents are exactly the same, regardless of the number of files generated.
This example prepares a list of file names to be used with RESTORE. The input is
a list of SQL names.
MXGNAMES -SQLNames=$VOL1.SQLSTUFF.SQLNAMES -output=NAMELIST -BR2
-node=\BNODE
Suppose the contents of the file SQLNAMES are as:
CAT.SCH.T126A
CAT.SCH.T126B
The output of the command is a file called NAMELIST containing this:
LOCATION
(
\PNODE.$VOL1.ZSDA126A.BXNL1R00 TO \BNODE.$VOL1.ZSDA126A.BXNL1R00,
\PNODE.$VOL2.ZSDA126A.BXNL2R00 TO \BNODE.$VOL2.ZSDA126A.BXNL2R00,
\PNODE.$VOL3.ZSDA126A.BXNL3R00 TO \BNODE.$VOL3.ZSDA126A.BXNL3R00,
\PNODE.$VOL4.ZSDA126A.BXNL4R00 TO \BNODE.$VOL4.ZSDA126A.BXNL4R00,
\PNODE.$VOL5.ZSDA126A.BXNL5R00 TO \BNODE.$VOL5.ZSDA126A.BXNL5R00,