× 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.



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):

 http://publib.boulder.ibm.com/cgi-bin/bookmgr/docnum/sc41-5721-01

--Dave

-------------------------------------------------------
#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);
  return;
}

The CLMOD:
------------------------------------------------------------
             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)
/*-------------------*/
ALLOC:
             ALCOBJ     OBJ((&LIB/&NAME &TYPE &STATE))
             GOTO       CMDLBL(ENDPGM)
/*-------------------*/
DEALLOC:
             DLCOBJ     OBJ((&LIB/&NAME &TYPE &STATE))
             GOTO       CMDLBL(ENDPGM)
/*-------------------*/
ENDPGM:
             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?

--
JHHL



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.