Restrictions
The following restrictions apply equally to main and subordinate procedures
unless otherwise indicated.
- Do not write incomplete commands.
In batch mode, QMF has no way of
prompting you for the complete command.
- Do not try to directly access command prompt panels. (Do not issue commands
that use the question mark to obtain the command prompt panels.)
- Do not issue commands that might cause the display of confirmation panels.
These are commands that erase, update, or replace database objects, or
that replace exported files. A confirmation panel asks you whether you want
to make a change. In batch mode, QMF has no way of handling such prompts.
You can still issue commands that erase or change data objects,
but you must inhibit the confirmation prompt.
To inhibit the confirmation
panel, include CONFIRM=NO or issue the command:
SET PROFILE (CONFIRM=NO
- Avoid situations that might display the incomplete data prompt.
QMF
has no way of prompting you in batch mode.
- Save the main batch procedure, specifying SHARE=YES. If you have issued
a SET GLOBAL command with the value DSQEC_SHARE=1 prior to this SAVE command,
you do not need to specify the SHARE=YES parameter.
If you're using a QMF National Language Feature (NLF): You are writing a sequence
of QMF commands that the NLF must understand. This
means that the verbs and keywords in the commands must be the translated versions
of their English-language counterparts: ANZEIGEN for DISPLAY, for example,
in a German batch mode procedure, and PROZEDUR for PROC.
Example for VM
The following main procedure illustrates some of the restrictions on batch
procedures in the VM environment:
CONNECT userid (PASSWORD = mypass
RUN MYQUERY (FORM = myform
SAVE DATA AS MYTABLE (CONFIRM = no
CMS CP SP PRT TO USERID
PRINT REPORT
CMS CP SP PRT CLOSE
- CONNECT
- Gives the CMS batch machine the same authorization (via a password)
as the user ID associated with submitting the batch work. That user ID must
be authorized to connect to SQL/DS and have a password in SYSTEM.SYSUSERAUTH.
- RUN
- Runs a stored query with a stored form.
- SAVE
- Saves the data in the database.
- CMS CP SP PRT
- Sends output to a user ID instead of to a printer.
- PRINT
- Prints a report based on the query results.
- CMS CP SP PRT CLOSE
- Ends printing.
Example for OS/390
The following main procedure illustrates some of the restrictions on batch
procedures for the VM environment:
SET PROFILE (CONFIRM=NO
RUN QUERYA (&&LICENSE='007'
PRINT REPORT (PRINTER='
SAVE DATA AS TABLEA
RUN PROCA (&&TABLE=TABLEA
EXIT
- SET
- Eliminates the possible display of confirmation panels. In batch mode,
such a display produces an error.
- RUN QUERYA
- Passes the value 007 to QUERYA for the substitution variable &LICENSE; If
QUERYA contained other substitution variables, the run would fail.
The
object names in this command are not qualified with the owner's name. Their
owner is therefore the person for whom the procedure is being run; that is,
the person whose logon ID appears as the USER parameter on the JOB card.
- PRINT
- Prints a report based on the query results. The output goes to the DSQPRINT
data set.
- SAVE
- Saves the data in the database. The SAVE command need not contain CONFIRM=NO
because of the SET PROFILE command at the start of the procedure. If the DATA
object is too large for the storage that is reserved for it, the SAVE command
might end the procedure through the incomplete-data prompt condition.
- RUN PROCA
- Runs a procedure that does something with TABLEA (the table that was
just created or replaced by the SAVE command). The name of this table is passed
to the procedure through the &TABLE parameter. This command fails if the
procedure called has other substitution variables not set.
- EXIT
- Ends the procedure and QMF.
[ Previous Page | Next Page | Contents | Index ]