MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » March 2002

RE: More CPYFRMIMPF question - Monitor for bad path...



fixed

My mistake. Forgot that CALLPRC can do that.

But I tried it and it does not work. The value returned is some 'random'
hex value (x'E9A75471', e.g.). Tried it in C and it's fine - of course.
Don't have an RPG compiler so can't try that.

At 04:15 PM 3/27/02 -0600, you wrote:
>Vernon,
>
>Why not in CLLE?  CALLPRC supports return values. I know it returns as
>integer, but couldn't you receive it as 4 *Char and then CHGVAR %BIN(xxxx)?
>
>Eric DeLong
>Sally Beauty Company
>MIS-Sr. Programmer/Analyst
>940-898-7863 or ext. 1863
>
>
>
>-----Original Message-----
>From: Vernon Hamberg [mailto:vhamberg@attbi.com]
>Sent: Wednesday, March 27, 2002 2:48 PM
>To: midrange-l@midrange.com
>Subject: Re: More CPYFRMIMPF question - Monitor for bad path...
>
>
>There's an API that can test for the existence of an object in IFS - it's
>called "access". You can use it in ILE RPG but not CLLE.
>
>return_value = access(path, 4)
>
>is about it. return_value is 0 if exists, -1 if not.
>
>Anyone know the SRVPGM for this? It's from unistd.h
>
>
>At 03:16 PM 3/27/02 -0500, you wrote:
>
> >More on CPYFRMIMPF....
> >
> >I want to monitor for a failed copy.  for instance, a bad path name entered
> >or really, any other message.
> >
> >The only escape message to monitor for listed in the command help is
> >CPF2817 - Copy command ended because of error.
> >
> >problem is, when I enter an invalid FROMSTMF path, it doesn't give me this
> >message:  it must have something to do with interim steps the command
> >takes.
> >
> >If I enter an invalid path, and look at my job log, the following messages
> >are gen'd:
> >
> >Ownership of object QCPIMTEMPS in QTEMP type *USRSPC changed.
> >Ownership of object QACPTEMP01 in QTEMP type *USRSPC changed.
> >Member MYFILE file MYFILE in MYLIB cleared.
> >File QACP296636 created in library QRECOVERY.
> >Member QACP296636 added to file QACP296636 in QRECOVERY.
> >File QACP296636 in library QRECOVERY was created.
> >Object not found.
> >Ownership of object FRCP296636 in QRECOVERY type *USRSPC changed.
> >Ownership of object TOCP296636 in BAIRDR type *USRSPC changed.
> >0 records copied from member QACP296636.
> >Object QACP296636 in QRECOVERY type *FILE deleted.
> >File QACP296636 in library QRECOVERY was created.
> >
> >So, it looks like it doesn't care if the file exists in the specified
> >FRMSTMF path.  it clears the destination file (if *replace is spec'd) and
> >copys zero records.
> >
> >I also tried to monitor for 'Object not found' (CPFA0A9) but it is a
> >diagnostic, not an escape message.
> >
> >you would think an invalid path would make the command bomb, whouldn't you?
> >
> >So, I guess my real question is:
> >is there an equivelent to CHKOBJ for a file in the IFS?
> >
> >Thanks,
> >
> >Rick
> >
> >_______________________________________________
> >This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> >To post a message email: MIDRANGE-L@midrange.com
> >To subscribe, unsubscribe, or change list options,
> >visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> >or email: MIDRANGE-L-request@midrange.com
> >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@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
>or email: MIDRANGE-L-request@midrange.com
>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@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
>or email: MIDRANGE-L-request@midrange.com
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/midrange-l.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact