No, ILE CL can have only 1 procedure per module.  So if you need
multiple functions, two methods that suggest themselves are multiple CL
modules, or what I usually use, the simple-minded method (see below).

Here's the earliest manual I could find (V4R2):


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void  CLMOD( void *, void *, void *, void *, void *);

void main(int argc, char *argv[])
  char       obj[10]  = "AFILE     ";
  char       lib[10]  = "MYLIB     ";
  char       type[7]  = "*FILE  ";
  char       state[7] = "*EXCLRD";

  CLMOD("ALLOC   ", obj, lib, type, state);

/*  some stuff  */

  CLMOD("DEALLOC ", obj, lib, type, state);

             PGM        PARM(&OPER &NAME &LIB &TYPE &STATE)

             DCL        VAR(&OPER   ) TYPE(*CHAR) LEN( 8)
             DCL        VAR(&NAME   ) TYPE(*CHAR) LEN(10)
             DCL        VAR(&LIB    ) TYPE(*CHAR) LEN(10)
             DCL        VAR(&TYPE   ) TYPE(*CHAR) LEN( 7)
             DCL        VAR(&STATE  ) TYPE(*CHAR) LEN( 7)

             IF         COND(&OPER *EQ 'ALLOC   ') THEN(GOTO ALLOC)
             IF         COND(&OPER *EQ 'DEALLOC ') THEN(GOTO DEALLOC)
             GOTO       CMDLBL(ENDPGM)
             ALCOBJ     OBJ((&LIB/&NAME &TYPE &STATE))
             GOTO       CMDLBL(ENDPGM)
             DLCOBJ     OBJ((&LIB/&NAME &TYPE &STATE))
             GOTO       CMDLBL(ENDPGM)

James H H Lampert wrote:
Dave McKenzie <davemck@xxxxxxxxxxxxx> wrote:
What I usually do is create an ILE CL module with all the CL commands I want to do and bind it with the C module. Then call it like a function, passing parms to the commands.

Hmm. Can you point me to an example of this? Up until about 10 minutes ago, I didn't know ILE CL was available far enough back to work in my situation.

I'm having trouble locating docs on what ILE CL can do. Can it do multiple procedures in a module?


This thread ...


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

This mailing list archive is Copyright 1997-2020 by 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].