Hello,

I have been dealing with some strange behaviour.

I am trying to run a job that calls BPXBATCH do execute a Unix script.

The Unix script tries to copy the file from the Unix environment to a MVS 
dataset. I have tried these two approaches. The filename is variable.

1) cp -P "RECFM=FB,SPACE=(CYL,(1,1)),LRECL=96,BLKSIZE=0" $myfilevar.ebcdic 
"//'PSTR.TEMP'"

2) tso -t "OGET '$myfilevar.ebcdic' 'PSTR.TEMP'"

Both approaches work fine when interactively I type them on a telnet session or 
on a TSO OMVS session, BUT FAIL when I call the script containing these 
commands using BPXBATCH on a JOB:

JCL:
//XXXXXXX JOB YYYYYY,TIME=1                                             
//COPY     EXEC PGM=BPXBATCH,REGION=8M,COND=(0,NE)                      
//STDIN    DD SYSOUT=*                                                  
//STDOUT   DD SYSOUT=*                                                  
//STDPARM  DD *                                                         
sh /spb/bin/Copy.sh                                                   
//*                                                                     

SYSOUT:

OGET '/spb/tmp/ABMA014_57D18317.33555264.D.ebcdic' 'PSTR.TEMP'  
IKJ56225I DATA SET PSTR.TEMP ALREADY IN USE, TRY LATER+         
IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER          
RC(12)                                                          

Why the dataset appears to be "in use" ?? It DOES NOT EVEN exists!

I get this message whenever my script uses 'cp' or 'oget'...

Regards,

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to