It isn't really clear to me what you are trying to do other than some variation on /bin/find and then processing the resulting list of files. Are you are trying to start multiple concurrent processes? I can't tell.
For your general description, you may want to start with a main rexx exec, itself stored in zFS with chmod +x. Kick this off from a single BPXBATCH job step if you like and try to local spawn using _BPX_SHAREAS=YES. Then you could mix .rexx shell scripts with executable /bin/sh shell scripts to do what you want. All along the way, "export _BPX_SHAREAS=YES and export _BPX_SPAWN_SCRIPT=YES", and in the /bin/sh scripts, do "set -o pipecurrent". This will help reduce OMVS address spaces, but it only helps with spawns, and not in the cases where something like the shell does fork/exec. If you want efficiency, you can do low-level Unix programming using the REXX "syscall commands", but this requires pretty good familiarity with low level Unix programming. Another possibility (depending on the details), would be to have your main rexx use bpxwunix to local-spawn /bin/find to find potential files and return them all to rexx in either a temp file or stem. Then your main rexx can parse through those and maybe use syscall commands to move, rename, delete, etc. At the end of the day, it's impossible to give very good answers to a question that is posed so generally and without much detail. -- Kirk Wolf Dovetailed Technologies PS> You might look at the sample REXX /samples/skulker for ideas. It sounds generally similar to what you are describing. It is not particularly efficient. https://www.ibm.com/docs/en/zos/2.1.0?topic=descriptions-skulker-remove-old-files-from-directory On Mon, May 30, 2022, at 7:52 AM, Itschak Mugzach wrote: > Kirk, > > A rexx exec is processing a file system. First call to bpxbatch perform ls > looping on the directories listed in the root to look for specific files > (ignore the logix, it was dictated by a uniprocessor and a mixture of > software). > I noticed that every call to unix creates (or starts) a shadow STC to > process the command. My assumption is that the way it works affects elapse, > and maybe, cpu consumption. I want the program to be as efficient as > possible. > > so, to summarize: > > - The Program is a (tso) rexx running unix commands. > - Using the default shell of the user. > - I want to eliminate the STC, or keep it for the life of the exec. > - The quoted statement relates to the fact that I assume it is less > effective to run unix outside of the address space. > > ITschak > > > *| **Itschak Mugzach | Director | SecuriTeam Software **|** IronSphere > Platform* *|* *Information Security Continuous Monitoring for Z/OS, zLinux > and IBM I **| * > > *|* *Email**: [email protected] **|* *Mob**: +972 522 986404 **|* > *Skype**: ItschakMugzach **|* *Web**: www.Securiteam.co.il > <http://www.securiteam.co.il/> **|* > > > > > > On Mon, May 30, 2022 at 3:41 PM Kirk Wolf <[email protected]> wrote: > > > I would need more information: > > > > - By "the command" do you mean a z/OS Unix shell command? > > > > - Why exactly do you want BPXBATCH? > > > > - Do you want another STC for each "command", or is that what you don't > > want? > > > > - Do you need the z/OS Unix shell itself, or is it OK to run the command > > without a shell? > > > > - What language is your program developed in? > > > > - I don't understand this: > > "I want to use the same time used to create a new stc every call and that > > the unix task will remain active the entire job life" > > > > Kirk Wolf > > Dovetailed Technologies > > > > On Sun, May 29, 2022, at 8:00 AM, ITschak Mugzach wrote: > > > I am running a program that calls BPXBATCH several times. Each call > > creates > > > another task (STC) that runs the command. I want to use the same time > > used > > > to create a new stc every call and that the unix task will remain active > > > the entire job life. Is this possible? > > > > > > ITschak > > > > > > ITschak Mugzach > > > *|** IronSphere Platform* *|* *Information Security Continuous Monitoring > > > for z/OS, x/Linux & IBM I **| z/VM coming soon * > > > > > > ---------------------------------------------------------------------- > > > For IBM-MAIN subscribe / signoff / archive access instructions, > > > send email to [email protected] with the message: INFO IBM-MAIN > > > > > > > Kirk Wolf > > Dovetailed Technologies > > http://dovetail.com > > > > ---------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to [email protected] with the message: INFO IBM-MAIN > > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > Kirk Wolf Dovetailed Technologies http://dovetail.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
