Better: http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/AccessMethodServices.html <quote> A class that provides a Java interface to z/OS Access Method Services (IDCAMS).
Output from IDCAMS (DD SYSPRINT) is redirected by default to a String ( getOutputLines() <http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/AccessMethodServices.html#getOutputLines()>). The method setOutputDDName(String) <http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/AccessMethodServices.html#setOutputDDName(java.lang.String)> may be used before execute() <http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/AccessMethodServices.html#execute()> to direct IDCAMS output to a pre-allocated DDNAME. </quote> and http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/ZFile.html On Tue, Dec 29, 2015 at 6:54 PM, John McKown <[email protected]> wrote: > On Tue, Dec 29, 2015 at 5:36 PM, Lindy Mayfield <[email protected]> > wrote: > >> It's an environment variable: >> >> export TSOPROFILE='msgid' >> >> Actually, I wanted it turned on because the software was looking for IGC* >> message id's to know if a delete was successful or not. >> > > Lindy, > > Why not use some of the JZOS functions instead of "tsocmd" for this? > > > http://www-01.ibm.com/support/knowledgecenter/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/index.html > <quote> > ... > > > > - dsExists > > public static boolean dsExists(java.lang.String dsn) > throws ZFileException > <http://www-01.ibm.com/support/knowledgecenter/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/ZFileException.html?lang=en-us> > > Answer true if the given dataset name exists. > > *Note:* Only datasets with FB or VB record format are supported prior > to version 2.4.0. > > Parameters:dsn - a datasetname, which may be enclosed in single quotes > if already fully qualified, and may or may not be preceded by "//". The > datasetname may include a PDS member name.Returns:true if the dataset > exists, false otherwise. If a dataset(member) name is given, the PDS member > must exist.Throws:ZFileException > > <http://www-01.ibm.com/support/knowledgecenter/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/ZFileException.html?lang=en-us> > > > ... > > > > * - removepublic static void remove(java.lang.String fileName) throws > ZFileException > <http://www-01.ibm.com/support/knowledgecenter/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/ZFileException.html?lang=en-us>Removes > (deletes) a file (a dataset)This method calls the remove() C-library > routine. To delete a dataset, use "//my.dataset" or > "//'fully.qualified.dataset'".Throws:ZFileException > <http://www-01.ibm.com/support/knowledgecenter/SSYKE2_6.0.0/com.ibm.java.zsecurity.api.60.doc/com.ibm.jzos/com/ibm/jzos/ZFileException.html?lang=en-us> > - > if the native call fails or file is not a > dataset/ddnamejava.lang.SecurityException - if there is a SecurityManager > and access is disallowed.* > ... > > </quote> > > > > >> >> Lindy >> >> > -- > Computer Science is the only discipline in which we view adding a new wing > to a building as being maintenance -- Jim Horning > > Schrodinger's backup: The condition of any backup is unknown until a > restore is attempted. > > Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be. > > He's about as useful as a wax frying pan. > > 10 to the 12th power microphones = 1 Megaphone > > Maranatha! <>< > John McKown > -- Computer Science is the only discipline in which we view adding a new wing to a building as being maintenance -- Jim Horning Schrodinger's backup: The condition of any backup is unknown until a restore is attempted. Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be. He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
