HP C/iX Reference Manual (31506-90011)

126 Chapter8
Compiling and Running HP C/iX Programs
Running HP C/iX Programs
output and the standard output to the file OUTFILE. In this example, argc is set to 3.
The Fileset Wildcard Feature
If the fileset wildcard feature is selected when the program is linked, the INFO string
handler for a compiled HP C/iX program expands valid fileset wildcards into fully qualified
permanent file names and passes them into the main program through the argv vectors.
To use the wildcard feature, add the relocatable library LIBCWC.LIB.SYS to the FROM
list when linking your program. If this file is not in the FROM list, the wildcard feature is
not enabled. The CCXLLK and CCXLGO commands do not include this library when
linking.
Example
LINK FROM=MYOBJ,LIBCWC.LIB.SYS; RL=LIBCINIT.LIB.SYS; TO=MYPROG
This example enables the wildcard feature for INFO strings passed to MYPROG.
The fileset wildcards characters for an HP C/iX program are @, ?, and #. They are based on
the standard MPE/iX wildcards recognized by commands and subsystems. The wildcard
characters are described in the following table.
These characters can be used as follows:
Character Description
n@ Represents all filenames starting with the character n.
@n Represents all filenames ending with the character n.
n@x Represents all filenames starting with the character n and ending with the
character x.
n Represents all filenames starting with the character n followed by a
maximum of seven digits.
?n@ Represents all filenames whose second character is n.
n? Represents all 2-character filenames starting with the character n.
?n Represents all 2-character filenames ending with the character n
NOTE
Each wildcard character is one of the 8-character limit for account, group, and
filename. A valid wildcard fileset must start with an alphabetic character, an
@, or a ?. Invalid wildcard filesets are passed unaltered to the main program.
Example
If the permanent files in the group and account MYGROUP.MYACCT contains FILE1, FILEX,
MYFILE, and MYPROG, the following:
RUN MYPROG; INFO="@ FILE# FILE?"
yields: