Client Automation Standard Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

ZSTOP's for folder present

Occasional Contributor

ZSTOP's for folder present

I'm trying create a zstop that only deploys the package if a folder is present. I've been beating my head against the wall trying to figure it out in the rexx guide, any suggestions? Like WORDPOS(EDMGETV(ZMASTER,ZROOTDRV),'\FOLDER\FOLDER')=1 Is something like this doable? Thanks, Jim
5 REPLIES
Respected Contributor

Re: ZSTOP's for folder present

A ZSTOP can not detect a folder present on the client. It is running on the RCS, therefore it would detect if the folder was present on the RCS.

To detect if a file or folder is present on the client, add the logic to a presetup.rex or initmeth.rex.

If you don't want the overhead on every connection, then add it to an install.rex and have that attached to the zservice you are interested in.
Respected Contributor

Re: ZSTOP's for folder present

You also asked how to do this logic.

I would think STREAM would be the method for the script if using rexx.

The below code works for "file exists" I've never tried it with "folder exisits"

/* Check for File Existance */
FileExists:
say 'Checking Existance of File...........['||arg(1)||']'
if (stream(arg(1), "c", "query exists") <> "") then do;
say 'Found File...........................['arg(1)']'
return 1
end
else do
say 'Could Not Find File..................['arg(1)']'
return 0
end
return;

The whole script is at http://hypercafe.timber-wolf.info/forum/showthread.php?t=61
Occasional Contributor

Re: ZSTOP's for folder present

Thanks for the help! If I have to do it presetup I may Just use VB as I under stand it better. Thanks again.
Honored Contributor

Re: ZSTOP's for folder present

Have you considered using a ZINIT or BCREATE method?
Respected Contributor

Re: ZSTOP's for folder present

You may also consider using Dynamic Scan under COP.
Be aware that dynamic scans are run, only if you are using COP, and scan are run at the begining of the client connect.

//Add this to "OnDomLoad" event