Re: IDCAMS if-else

2014-03-06 Thread Elardus Engelbrecht
Micheal Butz wrote: I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print for this However I am always coming up with a cc of 0 in the jcl for this step Ok. I have followed this thread where CM Poncolet and Paul Gilmartin

Re: IDCAMS if-else

2014-03-06 Thread Elardus Engelbrecht
Elardus Engelbrecht wrote: ... where CM Poncolet ... Damn! Sorry, CM Poncelet for my unintended typo. Please accept my apology. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access

Re: IDCAMS if-else

2014-03-06 Thread John Eells
Micheal Butz wrote: Hi, I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print for this snip For an extensive, working example of using conditional logic in IDCAMS, see the ALLOCDS job in ServerPac if you installed z/OS

Re: IDCAMS if-else

2014-03-06 Thread Greg Shirey
... ... // ENDIF HTH, Greg Shirey Ben E. Keith Company -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Micheal Butz Sent: Wednesday, March 05, 2014 5:22 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: IDCAMS if-else I have 2 files and would lime

Re: IDCAMS if-else

2014-03-06 Thread Paul Gilmartin
On Wed, 5 Mar 2014 18:21:34 -0500, Micheal Butz wrote: I have 2 files and would li[k]e to see If one or both or none exist I am using IDCAMS if-else sequence An alternative if TSO is available is to use LISTDSI which (I think) returns tracks used in a variable. Requires that the data sets

Re: IDCAMS if-else

2014-03-06 Thread CM Poncelet
No problem at all. I have a large collection of 'alternative spellings' ... which I hope to auction on ebay grin Elardus Engelbrecht wrote: Elardus Engelbrecht wrote: ... where CM Poncolet ... Damn! Sorry, CM Poncelet for my unintended typo. Please accept my apology. Groete /

IDCAMS if-else

2014-03-05 Thread Micheal Butz
Hi, I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print for this However I am always coming up with a cc of 0 in the jcl for this step E.G. Let's say filea is empty so is fileb Print indataset(filea) count (1

Re: IDCAMS if-else

2014-03-05 Thread CM Poncelet
Try setting MAXCC EQ whatever, e.g. 4 or 8 instead of LASTCC. Micheal Butz wrote: Hi, I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print for this However I am always coming up with a cc of 0 in the jcl for this step

Re: IDCAMS if-else

2014-03-05 Thread CM Poncelet
On Mar 5, 2014, at 6:37 PM, CM Poncelet ponce...@bcs.org.uk wrote: Try setting MAXCC EQ whatever, e.g. 4 or 8 instead of LASTCC. Micheal Butz wrote: Hi, I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print

Re: IDCAMS if-else

2014-03-05 Thread Micheal Butz
: Hi, I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print for this However I am always coming up with a cc of 0 in the jcl for this step E.G. Let's say filea is empty so is fileb Print indataset(filea) count (1

Re: IDCAMS if-else

2014-03-05 Thread Paul Gilmartin
On Wed, 5 Mar 2014 18:21:34 -0500, Micheal Butz wrote: I have 2 files and would li[k]e to see If one or both or none exist I am using IDCAMS ... exist or are nonempty? This is another thing it's ridiculously easy to do with z/OS UNIX: File1=SYS1.MACLIB(SPLEVEL) File2=SYS1.MACLIB(WAIT)

Re: IDCAMS if-else

2014-03-05 Thread Micheal Butz
I do a print indataset for count(1) if the dataset is just catalogued I should get a non 0 return code Can I use unix from a IDCAMS job ? Sent from my iPhone On Mar 5, 2014, at 8:03 PM, Paul Gilmartin paulgboul...@aim.com wrote: On Wed, 5 Mar 2014 18:21:34 -0500, Micheal Butz wrote: I

Re: IDCAMS if-else

2014-03-05 Thread CM Poncelet
, CM Poncelet ponce...@bcs.org.uk wrote: Try setting MAXCC EQ whatever, e.g. 4 or 8 instead of LASTCC. Micheal Butz wrote: Hi, I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print for this However I am always

Re: IDCAMS if-else

2014-03-05 Thread Paul Gilmartin
On Wed, 5 Mar 2014 20:06:14 -0500, Micheal Butz wrote: I do a print indataset for count(1) if the dataset is just catalogued I should get a non 0 return code Can I use unix from a IDCAMS job ? Probably not, unless IDCAMS has an escape-to-host-command facility. Your use of IDCAMS job step

Re: IDCAMS if-else

2014-03-05 Thread CM Poncelet
: Hi, I have 2 files and would lime to see If one or both or none exist I am using IDCAMS if-else sequence With a command of print for this However I am always coming up with a cc of 0 in the jcl for this step E.G. Let's say filea is empty so is fileb Print indataset(filea) count (1) If lastcc ne 0