Progress/400
Product Guide


QCMD Functions

Two techniques are available for submitting OS/400 commands from a Progress client:

QCMD Field Size Limitation

The field cmd in the QCMD file has a maximum length of 256 characters. However, a format of x(60) has been defined for the field cmd in the as4empty.df file. This allows entering only 60 characters when an UPDATE cmd is performed. The solution to this limit is to use the following p-code to allow entry of up to 256 characters into the cmd field:

DO TRANSACTION:
  CREATE QCMD.
  UPDATE cmd VIEW-AS EDITOR.
    INNER-CHARS 50 INNER-LINES 5 MAX-CHARS 256
    LABEL "Command".
  VALIDATE  QCMD.
END. 

The following p-code will fill the field cmd with all characters in the assign statement:

DO TRANSACTION:
  CREATE QCMD.
  ASSIGN cmd = "! CRTMOD MODULE(QTEMP/ASNSSTOP) SRCFILE(MYLIB/SR) " +
    "SRCMBR(ASNSSTOP) OUTPUT(*PRINT) OPTION(*SYSINCPATH) " +
    "DBGVIEW(*ALL)"
  VALIDATE  QCMD.
END. 

The Progress/400 DataServer supports a special command for opening and closing files.

NOTE: For the CLOSE commands, there is no space between the exclamation point (!) and the CLOSE keyword.

If the entry is not one of these cases, Progress/400 writes a message to the job log and does not perform any processing.

When you use QCMD for the SBMJOB command, Progress/400 submits the command to the job queue specified for the JOBQ parameter, where it runs under the user profile specified for the USER parameter. When you use QCMD to process a special Progress/400 command, the DataServer immediately processes it and ignores the remaining SBMJOB parameters.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095