|
Rob, I've been using the CHKIN command to do a quick and dirty IFS file existence test. Although the documentation for the CHKIN command says that the command is not supported for all file systems, I have found that it will tell you that the object doesn't exist before it complains about the file system. If you get the message 'File system is unsupported', then the object is there. Another more reliable way to check for IFS files is to use CL to call the 'stat' C function. Bruce Vining was kind enough to post this code back when I asked this same question, you might want to try this: ------------------------------------------------------------------- PGM PARM(&PARM) DCL VAR(&PARM) TYPE(*CHAR) LEN(32) DCL VAR(&RTNVALINT) TYPE(*CHAR) LEN(4) DCL VAR(&RTNVAL) TYPE(*CHAR) LEN(2) DCL VAR(&PATH) TYPE(*CHAR) LEN(100) DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00') DCL VAR(&BUF) TYPE(*CHAR) LEN(4096) CHGVAR VAR(&PATH) VALUE(&PARM *TCAT &NULL) CALLPRC PRC('stat') PARM(&PATH &BUF) + RTNVAL(%BIN(&RTNVALINT 1 4)) CHGVAR VAR(&RTNVAL) VALUE(%BIN(&RTNVALINT)) IF COND(&RTNVAL = '00') THEN(SNDMSG MSG('Found') + TOUSR(VINING)) ELSE CMD(SNDMSG MSG('Not found') TOUSR(VINING)) ENDPGM --------------------------------------------------------------------- - Lou Forlini Software Engineer System Support Products, Inc. At 02:40 PM 8/25/98 -0500, you wrote: >For objects under the QSYS.LIB system I can do a CHKOBJ to determine existance, etc. However what is the equivalent command for items under the IFS? For example if I perform the following: >MD /TEMP >CPYTOSTMF FROMMBR('/QSYS.LIB/QTEMP.LIB/XYZ.FILE/XYZ.MBR') TOSTMF('/TEMP/DUH.TXT') >and then later on what to check for the existance of /TEMP/DUH.TXT how would I do so? > >I am using the send mail API from IBM. I cannot figure out how to get it to send to multiple people at the same time. When you send a message using this API it deletes the message, on it's own time. Well, I loop from one user to the next and I need to wait until IBM is done sending the stream file before recreating it so I can send to the next person. > >Rob Berendt +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.