× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Missing OS/400 command processing feature
  • From: "R. Bruce Hoffman, Jr." <rbruceh@xxxxxxx>
  • Date: Wed, 06 Jan 1999 09:24:14 -0500



Greg van Paassen wrote:

> Some-one else may find this useful.
>
> Command exccmdlst -- execute a sequence of commands, delimited by ;
> (semicolon).

Okay.  Now shorter, fill in the commands in a source file member (can be stored
and used later) and point this command at the file member.  Reads file,
executes commands.  No semicolons.


----- Command Source -----


/* COMMAND NAME : EXEC */
/* CPP          : EXEC */
/* VCP          : NONE */

             CMD        PROMPT('Execute Commands from Member')

             PARM       KWD(SRCFILE) TYPE(QUALSRCF) FILE(*IN) +
                          PROMPT('Source file name:')

             PARM       KWD(SRCMBR) TYPE(*NAME) LEN(10) MIN(1) +
                          EXPR(*YES) PROMPT('Source file member name:')

 QUALSRCF:   QUAL       TYPE(*NAME) LEN(10) DFT(QCLSRC) EXPR(*YES)
             QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                          SPCVAL((*LIBL)) EXPR(*YES) PROMPT('Source +
                          file library:')


----- CL Source -----

pgm parm(&qual_file &src_mbr)

dcl &src_mbr *char 10
dcl &qual_file *char 20

dcl &src_file *char 10
dcl &src_lib *char 10

dclf  qclsrc

chgvar &src_file %sst(&qual_file 1 10)
chgvar &src_lib %sst(&qual_file 11 10)

ovrdbf qclsrc tofile(&src_lib/&src_file) mbr(&src_mbr)

@readfile:
   rcvf
   monmsg cpf0864 exec(return)

   sndpgmmsg msg(&srcdta) topgmq(*ext) msgtype(*rqs)
   goto @readfile

endpgm
--
===========================================================
R. Bruce Hoffman, Jr. -- IBM Certified AS/400 Administrator

-- The sum of all human knowledge is a fixed constant.
    It's the population that keeps growing!

begin:          vcard
fn:             R. Bruce Hoffman, Jr.
n:              ;R. Bruce Hoffman, Jr.
adr:            991 Lucon Road;;;Schwenksville;PA;19473;USA
email;internet: rbruceh@ibm.net
title:          Independant AS/400 Consultant
tel;work:       610-222-9707
tel;fax:        610-222-9717
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.