[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IFSDIR sometimes not working



   I have been using IFSDIR to put a list of files in a IFS directory
   into a workfile and then use SQL to show those files. I call it in a
   CL program, with an OVRDBF to put the list into the workfile that I
   want. The code is below. Most of the time it works fine, but
   occasionally the work file is empty (even though there are files or
   directories inside the directory that I examine. When I run it again a
   few seconds later, it works fine. Any ideas?
   Here's the relevant code (PPCSNO and PPFLR are character variables
   passed to this program):
   /* Work file name is based on time and day of week */
   RTVSYSVAL SYSVAL(QDAYOFWEEK) RTNVAR(&DAYOFWEEK)
   RTVSYSVAL SYSVAL(QTIME) RTNVAR(&TIME)
   CHGVAR VAR(&PPWKFL) +
   VALUE(%SST(&dayofweek 2 2) *cat +
   &time )
   CPYF FROMFILE(KAGPL/IFSFDIR) +
   TOFILE(LASDOC/&PPWKFL) MBROPT(*NONE) +
   CRTFILE(*YES)
   CLRPFM LASDOC/&PPWKFL
   /* If office code is LG, look in CaseDocs/LG */
   IF COND(&PPOFCD *EQ 'LG') THEN(DO)
   IF COND(&PPGRP *EQ 'X') THEN(DO)
   CHGVAR VAR(&PATH) VALUE('/CaseDocs/LG/groups/' *CAT +
   &PPCSNO *TCAT &PPFLR)
   ENDDO
   ELSE CMD(DO)
   CHGVAR VAR(&PATH) VALUE('/CaseDocs/LG/cases/' *CAT +
   &PPCSNO *TCAT &PPFLR)
   ENDDO
   ENDDO
   OVRDBF FILE(IFSFDIR) TOFILE(LASDOC/&PPWKFL)
   IFSDIR DIR(&PATH)
   , Larry Kleinman
   Kleinman Associates, Inc.
   212-949-6469
   203-255-4100
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------