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



Prior to V5R3 CLLE had only one syntax enhancement above CLP.  That was 
the command of CALLPRC.  Prompt the command and pay close attention to 
RTNVAL.

Or I can use an RPGLE example:
/free
  MyVar=MyProc(InputVar1:InputVar2:InputVar3);
/end-free
You call the procedure, MyProc, passing it the variables InputVar1, 
InputVar2 and InputVar3.  It assigns a result to MyVar.

In CLP you might have to do 
CALL PGM(MYPGM) 
     PARM(&INPUTPARM &OUTPUTPARM)
Some bound procedures do not use the concept of the &OUTPUTPARM.  They use 
what I showed in the RPGLE example, which is the same as the RTNVAL 
concept.
Thus, some api's may only be usable from CLLE.

Other enhancements to CLLE include the ability to compile it down to a 
*MODULE instead of a program.  Then you can bind multiple modules, some of 
different languages, (like CLLE and RPGLE), into one program.

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Adam Lang" <aalang@xxxxxxxxxxxxxxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
07/09/2004 12:58 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc

Subject
Re: Check existence of a directory?






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?
----- Original Message ----- 
From: "Wayne McAlpine" <wmcalpine@xxxxxxxxxxxxxxxxx>
To: <midrange-l@xxxxxxxxxxxx>
Sent: Friday, July 09, 2004 12:03 PM
Subject: Re: Check existence of a directory?


> I recently had a need for a command to do the same thing and I found
> some code at one of the AS/400 sites to do it.  Here's the source for my
>   CL command processing program.  The command is called CHKIFSOBJ and it
> simply passes a path name to the program.  The program will check for
> the existence of both IFS directories and files, returning CPF9897
> escape message if not found, very similar to CHKOBJ.  My apologies for
> not crediting the author; I've lost the link to the site.  Note that the
> source type is CLLE, not CLP.
>
>
>
>
> > I have a CL program that uses CHKDLO to determine the existence of a
folder.
> > We are changing things around to use directories.  What would the
equivalent
> > command be to check for the existence of a directory?  I assume we 
can't
use
> > wrklnk, because that will actually display the screen.  Also, what 
would
the
> > correct msgid be?
> >
> > Adam Lang
> > Systems Engineer
> > Rutgers Casualty Insurance Company
> > http://www.rutgersinsurance.com
> >
> > --
> > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> > To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> > or email: MIDRANGE-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/midrange-l.
> >
> >
>


----------------------------------------------------------------------------
----


> Columns . . . :    1  80                                      Browse
              QGPL/QCLSRC
>  SEU==>
CHKIFSOBJC
>  FMT **  ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
...+... 7 ...+... 8
>         *************** Beginning of data
****************************************************************************
***********
> 0001.00              PGM        PARM(&PARM) /* CPP for CHKIFSOBJ 
command.
+                 040707
> 0001.01                           Checks for the existence of an IFS +
040707
> 0001.02                           file(s). Source type is CLLE, not CLP.
*/                 040707
> 0002.00
040707
> 0003.00               DCL        VAR(&PARM)      TYPE(*CHAR) LEN(256)
040707
> 0004.00               DCL        VAR(&RTNVALINT) TYPE(*CHAR) LEN(4)
040707
> 0005.00               DCL        VAR(&RTNVAL)    TYPE(*CHAR) LEN(2)
040707
> 0006.00               DCL        VAR(&PATH)      TYPE(*CHAR) LEN(100)
040707
> 0007.00               DCL        VAR(&BUF)       TYPE(*CHAR) LEN(4096)
040707
> 0007.01               DCL        VAR(&NULL)      TYPE(*CHAR) LEN(1)
VALUE(X'00')             040707
> 0008.00
040707
> 0009.00               CHGVAR     VAR(&PATH) VALUE(&PARM *TCAT &NULL)
040707
> 0010.00
040707
> 0011.00               CALLPRC    PRC('stat') PARM(&PATH &BUF) +
040707
> 0012.00                            RTNVAL(%BIN(&RTNVALINT 1 4))
040707
> 0013.00
040707
> 0014.00               CHGVAR     VAR(&RTNVAL) VALUE(%BIN(&RTNVALINT))
040707
> 0015.00
040707
> 0016.00              IF         COND(&RTNVAL *NE '00') THEN(SNDPGMMSG +
040707
> 0017.00                           MSGID(CPF9897) MSGF(QCPFMSG) +
040707
> 0018.00                           MSGDTA('Object ' *BCAT &PARM *BCAT 
'not
+                  040707
> 0019.00                           found.') MSGTYPE(*ESCAPE))
040707
> 0020.00              ENDPGM
040707
>         ****************** End of data
****************************************************************************
**************
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>


----------------------------------------------------------------------------
----


> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.