+ Reply to Thread
Results 1 to 3 of 3

Thread: Appending some CL commands in a CL program.

  1. #1
    Guest.Visitor Guest

    Default Appending some CL commands in a CL program.

    How do I insert some CL commands inside a CL program dynamically.

  2. #2
    Guest.Visitor Guest

    Default Appending some CL commands in a CL program.

    Prem, There are a few ways. The most common is to call qcmdexc passing the commands and their associated length. Another API, qcapcmd can also be used. This api has several advantages over qcmdexc that make it better for interactive prompting, but in your case it may be overkill. Another technique is to add the commands to a source file and submit them as a database reader job using SBMDBJOB. I would recommend one of the previosly mentioned methods. David Morris

  3. #3
    G.Gaunt Guest

    Default Appending some CL commands in a CL program.

    Do you want to "insert" or "append"? To insert, use QCMDEXC or QCAPCMD API. To append, send the commands like this:
    SNDPGMMSG MSG(' first command string ') TOPGMQ(*EXT) MSGTYPE(*RQS) SNDPGMMSG MSG(' next command, etc. ') TOPGMQ(*EXT) MSGTYPE(*RQS) 
    Then call a request processing program, like QCMD.

+ Reply to Thread

Similar Threads

  1. PTF COMMANDS
    By David Abramowitz in forum General
    Replies: 3
    Last Post: 07-14-2005, 02:50 AM
  2. Replies: 4
    Last Post: 08-14-2004, 09:06 PM
  3. Appending records from AS/400 to MS Access database
    By David Abramowitz in forum Microsoft
    Replies: 3
    Last Post: 03-17-2003, 01:14 PM
  4. PC Commands from the AS/400
    By Guest.Visitor in forum General
    Replies: 1
    Last Post: 09-03-2002, 01:59 AM
  5. Appending non-contiguous fields
    By Guest.Visitor in forum Programming
    Replies: 5
    Last Post: 05-17-2000, 07:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts