> -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of Paul Gilmartin > Sent: Wednesday, June 20, 2012 10:18 AM > To: [email protected] > Subject: Re: Calling idcams > > On Wed, 20 Jun 2012 09:58:58 -0500, McKown, John wrote: > > >IGGCSI00 is only for doing the equivalent of a LISTCAT type > function. You could call IDCAMS itself, with I/O exits to > feed it the required commands as if they had come from SYSIN. > Or you might want to set up a TSO environment and invoke the > TSO commands. > > > >If you want to do the former (call IDCAMS using I/O exits), > you can download file 864 from http://cbttape.org/updates.htm > . It is some UNIX commands, one of which is called "ams" > which uses IDCAMS with I/O exits to implement a z/OS UNIX > command which prompts the shell user for IDCAMS commands and > returns the result. ... > > > Why I/O exits? What's wrong with POSIX pipes?
Easier for me to write I/O exits than to set up and allocate the pipes to SYSIN and SYSPRINT. Yes, I guess that I could have used pipes. But it is simplier FOR ME to use I/O exits. Especially in HLASM. Remember that I don't have a C compiler. > > What are the APF constraints on IDCAMS? I understand there are > some, but not for all functions. I don't know what requires APF authorization. The "ams" command is APF authorized in my environment by doing an "exattr -p -a ams" to mark the "ams" command as APF authorized and PROGRAM controlled. Most functions in IDCAMS will still work even without these attributes. I envisioned the "ams" command mainly to do LISTCAT, DELETE, and DEFINE commands. > Would BPX1EXM be a circumvention? (Does CBT 864 use BPX1EXM?) No, my code uses an normal z/OS ATTACHX macro to run IDCAMS program asynchronously to the main program. It basically sets up the parameters, does the ATTACHX with an ECB operand, then does a WAIT on the ECB. It is simple and relatively efficient. I use ATTACHX to isolate the main code from any "problems" encountered by IDCAMS without the "trouble" of setting up an ESTAEX, which would be necessary if I did a LINKX instead. Actually, since I don't do much but echo the IDCAMS exit code, I wouldn't even need to ATTACHX or ESTAEX, just let the "ams" command abend. > > -- gil John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
