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



After some investigation I was able to keep the code in CLLE:

From the CLLE:
DCL VAR(&IFSOBJ) TYPE(*CHAR) LEN(156)
DCL VAR(&RTNVALBIN) TYPE(*CHAR) LEN(4)
DCL VAR(&RTNVALDEC) TYPE(*DEC) LEN(5 0)
DCL VAR(&RECEIVER) TYPE(*CHAR) LEN(4096)
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')
Dcl Var(&St_MTime) Type(*Int) Stg(*Defined) +
Len(4) DefVar(&Receiver 29)
DCL VAR(&IFSRPGDAT) TYPE(*CHAR) LEN(12)
DCL VAR(&LIBRPGDAT) TYPE(*CHAR) LEN(12)

/*******check existance of the IFS object *****/
CHGVAR VAR(&IFSOBJ) VALUE(&IFSNAME *TCAT &NULL)
CALLPRC PRC('stat') PARM(&IFSOBJ &RECEIVER) +
RTNVAL(%BIN(&RTNVALBIN))
CHGVAR VAR(&RTNVALDEC) VALUE(%BIN(&RTNVALBIN))
IF COND(&RTNVALDEC *NE 0) THEN(DO)
GOTO CMDLBL(IFSERR)
ENDDO
CHGVAR VAR(&IFSRPGDAT) VALUE (&st_mtime)
ENDDO


It may not return the date in a nice readable format (05/21/08 15:53:18 shows as 1211381598 and 05/21/08 15:53:17 shows as 1211381597), it does allow me to compare the dates on 2 objects.

IF COND(&RTNVALDEC *NE 0) tells me that the object was not found.


Thanks
Jim

--- On Thu, 10/16/08, Mark S. Waterbury <mark.s.waterbury@xxxxxxx> wrote:

From: Mark S. Waterbury <mark.s.waterbury@xxxxxxx>
Subject: Re: How do I retrieve a STMF change date in a CLP
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Date: Thursday, October 16, 2008, 10:58 PM
Hi, Terrence:

If that's what you want, why not just write your own
command (and
command processing program)?

That's why IBM gave us the ability to create commands.

And that way, you could write this command processing
program in ILE RPG
IV, or even in ILE C/400, since it would probably be much
easier to deal
with the stat() API that way.

And then just use your new command in your CL programs, as
and when needed.

Cheers,

Mark S. Waterbury

> Terrence Enger wrote:
On Wed, 2008-10-15 at 13:39 -0500, DeLong, Eric wrote:

Search the archives for examples of the stat api
in CLLE. Here's the
page from the infocenter...


http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/stat.ht
m

Hth,
Eric DeLong


I wonder ... Is this requirement--to retrieve `stat`
info in a CL
program--common? Can we convince IBM to give us a
*CMD wrapped around
`stat`?

Cheers,
Terry,
the guy with a fetish for command definitions.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf
Of jim t
Sent: Wednesday, October 15, 2008 12:17 PM
To: midrange-l@xxxxxxxxxxxx
Subject: How do I retrieve a STMF change date in a
CLP

I have been asked to create a CL that will be used
to promote IFS
objects. In the CL I have to find out if the
object exists and what the
Last Change date is. Is this possible in a CL?

To see if the object exists I have tried "CD
/ToTheDir/TheStreamFile"
and monitoring for a CPFA0AB message. I am using
RTVDIRINF on the object
to get the change date but this is a slow method.


Thanks
Jim




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

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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.