COZBATCH and pasearch

Discussion of the free COZBATCH utility for z/OS
Post Reply
Posts: 17
Joined: Fri Aug 05, 2005 1:23 pm
Location: Indianapolis, IN

COZBATCH and pasearch

Post by rschramm » Wed May 02, 2012 3:18 pm

I am trying to run the unix command "pasearch -t" via cozbatch.

Here is the -LT output

Code: Select all

Copyright (C) 2005-2009 Dovetailed Technologies LLC. All rights reserved.
version 1.9.0 2011-05-02                                                 
<- setupEnvironment()                                                    
-> openDDs()                                                             
stdin file opened: //DD:STDIN                                            
stdout file opened: //DD:STDOUT                                          
stderr file opened: //DD:STDERR                                          
<- openDDs()                                                             
-> logRegionSize()                                                       
region size requested = 65536K, Actual below/above limit = 9192K / 65536K
<- logRegionSize()                                                       
-> setupProgname()                                                       
executing progname=login-shell="-/bin/sh"                                
<- setupProgname(-/bin/sh)                                               
-> spawnChild()                                                          
spawning progname=/bin/sh                                                
     argv[0] = -/bin/sh                                                  
current environment:                                                     
spawned /bin/sh (149)                                                    
<- spawnChild()                                                          
-> copyChildStreams(fd_cin=1 fd_cout=2 fd_cerr=4)                        
fd_cin selected for writing                                              
12 byte line read from DD:STDIN                                          
12 bytes written to child stdin                                          
fd_cin selected for writing                                              
DD:STDIN EOF                                                             
fd_cout selected for reading                                             
229 bytes written to DD:STDOUT                                           
fd_cerr selected for reading                                             
60 bytes written to DD:STDERR                                            
fd_cerr selected for reading                                             
child stderr output EOF                                                  
fd_cout selected for reading                                             
child stdout output EOF                                                  '
<- copyChildStreams()  
-> waitChild()         
<- waitChild()         
<- run()               
returning rc=exitcode=1

* Welcome to the DEV1 z/OS Enterprise Server - SCDC102         * 
the current working directory:                                   
EZZ8343I This command is not supported in this environment.      

I didn't realize that there were zUnix commands that wouldn't run via Cozbatch. Is there something I am missing?

Rob Schramm

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

Re: COZBATCH and pasearch

Post by dovetail » Thu May 03, 2012 8:38 am

This is curious.

We were able to reproduce this error. We also see that if we run with BPXBATCH that pasearch runs fine.

The difference is that COZBATCH is (by design) running the STDIN Unix shell script and pasearch command in the same address space.

Under BPXBATCH, it will start the command or shell script in a separate address space.

We believe that pasearch is checking its own address space, and when it sees that it is running under a JES2 job rather than an OMVS address space it fails with this error. Unless there is a good reason for this, I would consider this a "bug".

If you add this line to your COZBATCH script, forcing the pasearch command in a separate address space, then it will work:

pasearch ....


_BPX_SHAREAS=NO pasearch ....

Posts: 17
Joined: Fri Aug 05, 2005 1:23 pm
Location: Indianapolis, IN

Re: COZBATCH and pasearch

Post by rschramm » Thu May 03, 2012 1:31 pm

Awesome. Dang.. I saw the environment non-supported on the pasearch -d trace -t command... but didn't think of the export _BPX_SHAREAS=NO.

Thanks a bunch.
Rob Schramm

Post Reply