newbie COZBATCH install question

Discussion of the free COZBATCH utility for z/OS
Post Reply
p.bishop
Posts: 5
Joined: Thu Jun 21, 2012 9:48 pm

newbie COZBATCH install question

Post by p.bishop » Thu Jun 21, 2012 10:07 pm

Hi,

I'm pretty sure I've done all the install steps, e.g. have the PDSE allocated and populated, along with the sample JCL, the USS filesystem has its symlinks etc.

However, when I try the sample "fromdsn" against SYS1.MACLIB(ACB) I get:

CoZBatchÝN¨: Copyright (C) 2005-2009 Dovetailed Technologies LLC. All rights reserved.
CoZBatchÝN¨: version 2.1.1 2012-03-16
CoZBatchÝI¨: executing progname=login-shell="-/bin/sh"
fromdsn: FSUM7351 not found
todsn: FSUM7351 not found
CoZBatchÝI¨: returning rc=exitcode=127

I'm guessing somehow the path is wrong in the JCL as when I run it in OMVS it works OK:

$ fromdsn //'SYS1.MACLIB(ACB)' | grep BLKSIZE | todsn //'SM0504.TEST.OUTLIST'
fromdsn(SYS1.MACLIB(ACB))ÝN¨: 78 records/6240 bytes read; 6318 bytes written in 0.009 seconds (685.547 KBytes/sec).
todsn(SM0504.TEST.OUTLIST)ÝN¨: 243 bytes read; 3 records/240 bytes written in 0 milliseconds.

The failing JCL:

//xxxxxR1 JOB OHOT,XXXX,MSGCLASS=X,
// NOTIFY=&SYSUID,CLASS=X
//PROCLIB JCLLIB ORDER='xxxxx.PDS.COZJCL'
//JOBLIB DD DSN=xxxxxx.PDSE.ISPLLIB.LTR,DISP=SHR
//*
//*
//REGEX EXEC PGM=COZBATCH
//IN DD DSN=SYS1.MACLIB(ACB),DISP=SHR
//OUT DD DSN=&&TEMP,DISP=(NEW,PASS),
// SPACE=(CYL,(1,1)),
// DCB=(LRECL=80,RECFM=FB)
//STDIN DD *
# Copy lines matching a regular expression to DD:OUT
fromdsn //DD:IN | grep BLKSIZE | todsn //DD:OUT
//


Any assistance most gratefully accepted.

thx
Peter Bishop

dovetail
Site Admin
Posts: 1850
Joined: Thu Jul 29, 2004 12:12 pm

Re: newbie COZBATCH install question

Post by dovetail » Fri Jun 22, 2012 8:23 am

Hi Peter,

When you installed, did you choose to install symlinks (say, in /bin) ?

- If so, then you should have a link from /bin/fromdsn -> <cozinst>/bin/fromdsn etc
- If you didn't install symblinks (you answered "none"), then you will have to put <cozinst>/bin in your PATH

You say that under OMVS that it works. Could the batch job be running on a different LPAR?
If not, there is probably a reason why the PATH is not set up.

Try adding and "env" command to the beginning of the batch job script, so that you can see your PATH

p.bishop
Posts: 5
Joined: Thu Jun 21, 2012 9:48 pm

Re: newbie COZBATCH install question

Post by p.bishop » Mon Jun 25, 2012 1:07 am

Thx Admin...

Yes, I installed the symlinks, so I followed your lead and put in an "env" as the first command, which showed my $PATH, and then in the next job I simply appended the installation path to that, and Voila! All good. Still too much hacking, I'll speak to the sysprogs as I don't think I should have had to hack the $PATH like that.

Now I'm getting weird initiator S922 abends after the successful COZBATCH execution, again, something to talk to the sysprogs about...unless anyone has a hint?

CoZBatch[N]: Copyright (C) 2005-2009 Dovetailed Technologies LLC. All rights reserved.
CoZBatch[N]: version 2.1.1 2012-03-16
CoZBatch: executing progname=login-shell="-/bin/sh"
.. "env" output snipped ..
fromdsn(DD:IN)[N]: 78 records/6240 bytes read; 6318 bytes written in 0.006 seconds (1028.320 KBytes/sec).
todsn(DD:OUT)[N]: 243 bytes read; 3 records/240 bytes written in 0 milliseconds.
CoZBatch: returning rc=exitcode=0

Here's the weird abend after the above runs (seemingly successsfully). The abend has resulted in a mixture of JESMSGLG and JESYSMSG output (this is JES3).

16:00:41 IAT2000 JOB SM0504R1 (JOB07229) SELECTED D02 SRVCLASS=BATTEST
16:00:41 ICH70001I SM0504 LAST ACCESS AT 15:58:41 ON MONDAY, JUNE 25, 2012
16:00:41 IEF403I SM0504R1 - STARTED - TIME=16.00.41
16:00:44 IEC999I IGG0201W,SM0504R1,REGEX
16:00:48 IAT6312 THE FOLLOWING 000027 MESSAGES MAY BE LOGGED OUT OF SEQUENCE
16:00:46 IEF450I INIT INIT - ABEND=S0C4 U0000 REASON=00000004
16:00:46 TIME=16.00.44
16:00:46 -SM0504R1 STARTED -SYS=D02 -TIME (MINS.)- REGN SIZE<16 REGN SIZE>16
16:00:46 -STEPNAME PROCSTEP RC EXCP CPU CLOCK SERV USED SPEC'D USED SPEC'D
16:00:46 -REGEX *S0C4 2273 .00 2.0 5562 5% 6144K 9% 200M
16:00:46 IEF404I INIT - ENDED - TIME=16.00.44
16:00:46 -SM0504R1 ENDED -SYS=D02 NAME= TOTAL CPU TIME= .0 TOTAL ELAPSED TIME= 2.0
16:00:46 IEF196I IEF472I INIT INIT - COMPLETION CODE - SYSTEM=0C4 USER=0000
16:00:46 IEF196I REASON=00000004
16:00:46 IEF196I ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:00:46 IEF196I +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:00:46 IEF196I + DDname Unit EXCP_Count Blksize + DDname Unit
16:00:46 IEF196I EXCP_Count Blksize + DDname Unit EXCP_Count Blksize +
16:00:46 IEF196I + IEFINDMY 255E-Da 510 32,760 + ........ 2402-Da
16:00:46 IEF196I 1 27,920 +
16:00:46 IEF196I ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:00:46 IEF196I +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16:00:46 IEF196I IEF373I STEP/REGEX /START 2012177.1558
16:00:46 IEF196I IEF032I STEP/REGEX /STOP 2012177.1600
16:00:46 IEF196I CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00
16:00:46 IEF196I MIN 00.00 SEC
16:00:46 IEF196I VIRT: 316K SYS: 296K EXT: 18780K SYS:
16:00:46 IEF196I 12320K
16:00:46 IEF196I IEF375I JOB/SM0504R1/START 2012177.1558
16:00:46 IEF196I IEF033I JOB/SM0504R1/STOP 2012177.1600
16:00:46 IEF196I CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00
16:00:46 IEF196I MIN 00.00 SEC
16:00:48 IAT2006 PREMATURE JOB TERM - JOB SM0504R1 (JOB07229) - CANCELED - D02



thanks again,
Peter Bishop

p.bishop
Posts: 5
Joined: Thu Jun 21, 2012 9:48 pm

Re: newbie COZBATCH install question

Post by p.bishop » Mon Jun 25, 2012 1:09 am

Small correction (bad form to reply to my own post, I know)...

this abend was S0C4, others have been S922 even after what looks like a 0 return code from COZBATCH, still weird though...

cheers
Peter

p.bishop
Posts: 5
Joined: Thu Jun 21, 2012 9:48 pm

Re: newbie COZBATCH install question

Post by p.bishop » Mon Jun 25, 2012 1:15 am

Solved it...

For some reason (I forget why!!) I had forced STEPLIB to include the LE runtime stuff, i.e. pointed the STEPLIB ddname directly at them:

When I took that out and used the default, it's WAD. Below shows the correct STEPLIB:

*TEPLIB DD DSN=SYS1.CEE.SCEERUN,DISP=SHR
* DD DSN=SYS1.CEE.SCEERUN2,DISP=SHR
* DD DSN=SYS1.LPALIB,DISP=SHR
* DD DSN=SYS1.LINKLIB,DISP=SHR
STEPLIB DD DSN=SM0504.PDSE.ISPLLIB.LTR,DISP=SHR
* DD PATH='/u/sm0504/bin',PATHOPTS=ORDONLY,
* PATHMODE=(SIRWXU,SIRWXG,SIRWXO)


thanks for the help...off to try the Co:Z Launcher now!

cheers
Peter

dovetail
Site Admin
Posts: 1850
Joined: Thu Jul 29, 2004 12:12 pm

Re: newbie COZBATCH install question

Post by dovetail » Mon Jun 25, 2012 8:42 am

By default, COZBATCH runs your default login shell (normally /bin/sh).

With a login shell, /etc/profile and ~/.profile are run, which you can use to configure your $PATH

I can't say why the symlinks don't work...

- are the symlinks in a directory that is in your PATH?
- does that directory )and its parent directories) have the searchable permission bit on?
- are the symlink files marked executable?
- do they point to the right place?

p.bishop
Posts: 5
Joined: Thu Jun 21, 2012 9:48 pm

Re: newbie COZBATCH install question

Post by p.bishop » Wed Jun 27, 2012 1:10 am

Hi Dovetail,

it's OK, I wasn't clear enough...the symlinks are fine when I get my path going as required...

All WAD.

cheers
Peter

Post Reply