COZBATCH and pasearch

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

COZBATCH and pasearch

Post by rschramm »

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()                                                       
geteuid=9010                                                             
executing progname=login-shell="-/bin/sh"                                
<- setupProgname(-/bin/sh)                                               
-> spawnChild()                                                          
spawning progname=/bin/sh                                                
     argv[0] = -/bin/sh                                                  
current environment:                                                     
     >LIBPATH=/lib:/usr/lib:.<                                           
     >_EDC_ADD_ERRNO2=1<                                                 
     >HOME=/u/tsrcs<                                                     
     >_BPX_SHAREAS=MUST<                                                 
     >_BPX_SPAWN_SCRIPT=YES<                                             
     >_BPXK_JOBLOG=STDERR<                                               
     >PATH=/bin:/usr/bin<                                                
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?

Thanks,
Rob
Rob Schramm
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: COZBATCH and pasearch

Post by dovetail »

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:

export _BPX_SHAREAS=NO
pasearch ....

or:

_BPX_SHAREAS=NO pasearch ....
rschramm
Posts: 17
Joined: Fri Aug 05, 2005 1:23 pm
Location: Indianapolis, IN

Re: COZBATCH and pasearch

Post by rschramm »

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