TAA Tools
CRTCLPCALL      CREATE CLP CALL PARAMETERS             TAACLRZ

The  Create CLP  Call  Parameters  command  creates the  CALL  and  DCL
statements  for a  CLP  source member  using the  entry  parameter list
from  a  program  (CLP,  RPG,  or  single  module  RPGLE/CLLE).   After
ensuring a  CL source  member exists,  CRTCLPCALL  may be  used to  add
records  for the  CALL and  DCL statements.   This  simplifies building
the  proper  interface  between a  CL  program and  the  program  to be
called.

To perform the  inverse function of creating  the entry parameter  list
for a CL program, see the CRTCLPENT command.

To use CRTCLPCALL, the  source for the program to  be called must still
exist  where the program  was created from.   This prevents  the use of
CRTCLPCALL if a system program is specified.

A typical use of  CRTCLPCALL is where  you want to do  a call from  the
CL program PGMA  to a program named PGMB.   PGMB exists and could  be a
CLP, RPG, or single module RPGLE/CLLE program.

To use CRTCLPCALL,  a source member of type CLP  or CLLE must exist for
PGMA.    Ensure the  PGMA source  member exists  and use  CRTCLPCALL to
generate the  required  CALL  and DCL  statements  needed to  pass  the
parameters  to PGMB.   Assume  that  PGMB is  an RPG  program with  the
following statements:

     C           *ENTRY    PLIST
     C                     PARM           PARM1   5
     C                     PARM           PARM2  10
     C                     PARM           PARM3   30

Any  externally described files used  by the program must  exist on the
library list.

It is not  necessary to  define the  lengths of the  parameters on  the
PARM statement.   As long  as the definitions  exist within  the source
or  in   an  externally  described  file,   CRTCLPCALL  will  find  the
definitions.

After ensuring that the CLP source member PGMA exists, enter

            CRTCLPCALL  SRCMBR(PGMA) PGM(PGMB)

The following statements would be added to the PGMA member:

             CALL       PGM(xxx/PGMB) PARM(&PARM1 &PARM2 &PARM3)
             DCL        VAR(&PARM1) TYPE(*CHAR) LEN(5)
             DCL        VAR(&PARM2) TYPE(*CHAR) LEN(10)
             DCL        VAR(&PARM3) TYPE(*DEC) LEN(3 0)

You will need to move these  statements to the proper place within  the
source.  A qualified name is used for the PGM keyword.

CRTCLPCALL escape messages you can monitor for
----------------------------------------------

None.  Escape messages from based on functions will be re-sent.

Command parameters                                    *CMD
------------------

   SRCMBR        The source member  to have CL statements for  CALL and
                 DCLs written to.  The member must exist.

   PGM           The qualified  name of the program which  has an entry
                 parameter  list to create the  CALL and DCL statements
                 from.   The program  must  have an  attribute of  CLP,
                 RPG, or RPGLE/CLLE (single module).

                 The  source  member used  to  create  the object  must
                 still  exist where the object was  created from.  This
                 prevents the use  of CRTCLPCALL  when naming a  system
                 program.

                 The library qualifier  defaults to *LIBL.   A specific
                 library or *CURLIB may also be used.

   SRCFILE       The  qualified name of  the source file  where the CLP
                 member exists  which will  have statements  added  to.
                 QCLSRC is the default.

                 The library qualifier  defaults to *LIBL.   A specific
                 library, or *CURLIB may also be used.

   VARKWD        Whether to  use the VAR and TYPE  keywords for the DCL
                 commands.  *YES is the default.

                 *NO  may be specified  to use only  the keyword values
                 (the LEN keyword is used).

Restrictions
------------

The source  for  the program  or  command must  still  exist where  the
object  was created from.   This  prevents the  use of  CRTCLPCALL when
the named object is a system program.

Any  externally described files used  by the program must  exist on the
library list.

The number of CLP parameters is limited to 100.

The source member to be added to must be a type CLP or CLLE.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     RTVCLPCALL      Retrieve CLP call parameters
     RTVDAT          Retrieve date
     RTVDBFA         Retrieve data base file
     RTVRPGPARM      Retrieve RPG entry parameters
     RTVVALA         Retrieve value attributes
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   CRTCLPCALL    *CMD                   TAACLRZ       QATTCMD
   TAACLRZC      *PGM       CLP         TAACLRZC      QATTCL
   TAACLRZR      *PGM       RPG         TAACLRZR      QATTRPG
					

Added to TAA Productivity tools June 30, 2007


Home Page Up to Top