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



Hello,

> CLLE needs to be compiled using the CRTBNDCL command rather than
> CRTCLPGM.  This will also allow you to access the external procedure
> named 'stat.'
>
> > What is a CALLPRC?  Also, what is the significance of CLLE?  Am I able to
> > hack the code and paste it into my CL or is there a problem because of the
> > CLLE?

Incidentally, Herman Van der Staey posted the following message this
morning in the CL forum on the iSeries Network in response to a similar
question.  Here's his message:


Date: July 09, 2004 05:11 AM
Author: Herman (iseries400@xxxxxxxxxxxxxx)
Subject: Check if IFS object exists

You can use my program :

 /*   Program :      CHKOBJIFS                                     */
 /*   System  :      iSeries V5R1                                  */
 /*   Author  :      Herman Van der Staey                          */
 /*   Description :  Check object in Integrated File System (IFS)  */
 /*                                                                */
 /*   To compile :                                                 */
 /*         The source type must be "CLLE"   (and not CLP).        */
 /*         Compile with STRPDM option 14  or use the              */
 /*         CRTBNDCL command.                                      */
 /*                                                                */
 /*   To execute :                                                 */
 /*         CALL CHKIFSOBJ PARM(&IFSOBJ  &OBJTYPE)                 */
 /*                                                                */
 /*     &IFSOBJ is the IFS object, f.e.                            */
 /*        /mydir/myfile.ext                                       */
 /*        /mydir                                                  */
 /*        /qsys.lib/mylib.lib/myfile.file                         */
 /*        /qsys.lib/mylib.lib/myprogram.pgm                       */
 /*        /qsys.lib/mylib.lib/qrpgsrc.file/mysource.mbr           */
 /*                                                                */
 /*     &OBJTYPE returns  the object type, f.e.                    */
 /*        *STMF                                                   */
 /*        *DIR                                                    */
 /*        *FILE                                                   */
 /*        *PGM                                                    */
 /*        *MBR                                                    */

 CHKOBJIFS:  PGM       PARM(&IFSOBJ  &OBJTYPE)

             DCL       VAR(&IFSOBJ)     TYPE(*CHAR) LEN(256)
             DCL       VAR(&RTNVALBIN)  TYPE(*CHAR) LEN(4)
             DCL       VAR(&RTNVALDEC)  TYPE(*DEC) LEN(5 0)
             DCL       VAR(&PATH)       TYPE(*CHAR) LEN(100)
             DCL       VAR(&RECEIVER)   TYPE(*CHAR) LEN(4096)
             DCL       VAR(&NULL)       TYPE(*CHAR) LEN(1) VALUE(X'00')
             DCL       VAR(&OBJTYPE)    TYPE(*CHAR) LEN(7)

             CHGVAR     VAR(&IFSOBJ) VALUE(&IFSOBJ *TCAT &NULL)

             CALLPRC    PRC('stat') PARM(&IFSOBJ &RECEIVER) +
                          RTNVAL(%BIN(&RTNVALBIN))

             CHGVAR     VAR(&RTNVALDEC) VALUE(%BIN(&RTNVALBIN))

             IF         COND(&RTNVALDEC *NE 0) THEN(SNDPGMMSG +
                          MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('IFS +
                          Object ' *CAT &IFSOBJ *TCAT ' not found') +
                          MSGTYPE(*ESCAPE))

             CHGVAR     VAR(&OBJTYPE) VALUE(%SST(&RECEIVER 49 7))

 END:        ENDPGM

Herman,
iSeries Network Forum Pro


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.