IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

BPXBATCH without Home Directory


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
drowelf
Warnings : 1

New User


Joined: 03 Mar 2006
Posts: 47
Location: Simpsonville, SC

PostPosted: Tue May 04, 2010 12:01 am
Reply with quote

We need to execute some Unix Shell Scripts via BPXBATCH in our production environment. These Jobs run under a special ID via the USER= JCL Verb on the Job statement. When we attempt to run them we get an the standard error about not able to change to the Home Directory

FSUM1004 Cannot change to directory </u/userid>

Now I've been talking with our local support folks about this, but at this time, since this is a special user id and not a normal TSO user Id, we are unsure of how to define or create the Home Directory. So why question is twofold.

1) Can a shell script be executed without have a Home Directory? Is there another method besides BPXBATCH?

2) How can we create a Home Directory for this special Id?

BTW,

This is under z/os V1.9

TIA
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue May 04, 2010 1:35 am
Reply with quote

Can you paste your BPXBATCH step JCL with PARM info and DD cards?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue May 04, 2010 2:57 am
Reply with quote

1. I don't see how -- a UNIX shell script requires something be present in Unix System Services.

2. There are two parts to your answer: the first part depends upon whether or not you use automount. If so, the directory should automatically be created when the user id is accessed. If not, you'll need to manually create the home directory with the OMVS mkdir /u/userid command. The second part is that the RACF profile (if your site doesn't use RACF, the other security packages also have mechanisms to do this) for the user id must be update to include the home directory and shell program (typically /bin/sh).
Back to top
View user's profile Send private message
drowelf
Warnings : 1

New User


Joined: 03 Mar 2006
Posts: 47
Location: Simpsonville, SC

PostPosted: Tue May 04, 2010 9:19 pm
Reply with quote

Bill Dennis wrote:
Can you paste your BPXBATCH step JCL with PARM info and DD cards?


Here is the test JCL that I am using to validate our access and permissions.

Code:
//CA5CLZFS JOB (SYMCOR),'Clean zFS',                                   
//             CLASS=A,                                               
//             MSGCLASS=T,                                             
//****         TYPRUN=SCAN,                                           
//             USER=PRODID,                                           
//             MSGLEVEL=(1,1),                                         
//             NOTIFY=&SYSUID                                         
//*                                                                   
//         INCLUDE MEMBER=ATL5                                         
//*                                                                   
//S1SYMSUB EXEC PGM=IKJEFT01,                                         
//             PARM='SYMSUB2 HFSPATH=&HFSPATX'                         
//*                                                                   
//SYSEXEC  INCLUDE MEMBER=C5SYSEXE                                     
//*                                                                   
//SYSTSIN  DD  DUMMY                                                   
//SYSTSPRT DD  SYSOUT=&SYSOUT                                         
//*                                                                   
//CTL$IN   DD  *                                                       
  sh ls -al &HFSPATH                                                   
/*                                                                     
//CTL$OUT  DD  DSN=&&TEMP,DISP=(,PASS,DELETE),                         
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),SPACE=(TRK,10)     
//*                                                                   
//*-------------------------------------------------------------------*
//*D Run The OMVS Batch Facility                                       
//*C EQ 0000 Normal Completion, Continue Processing                   
//*C NE 0000 Error  Completion, Resolve Error                         
//*-------------------------------------------------------------------*
//S1OMVSBX EXEC  PGM=BPXBATCH                                         
//*                                                                   
//STDIN    DD  DUMMY                                                   
//STDOUT   DD  SYSOUT=&SYSOUT                                         
//STDERR   DD  SYSOUT=&SYSOUT                                         
//STDPARM  DD DISP=(OLD,DELETE),DSN=&&TEMP                             
"Code'd"

The first step performs variable substitution to produce the proper path in the ls command for any environment I run this under.

Thanks
Back to top
View user's profile Send private message
drowelf
Warnings : 1

New User


Joined: 03 Mar 2006
Posts: 47
Location: Simpsonville, SC

PostPosted: Tue May 04, 2010 9:35 pm
Reply with quote

Robert Sample wrote:
1. I don't see how -- a UNIX shell script requires something be present in Unix System Services.

2. There are two parts to your answer: the first part depends upon whether or not you use automount. If so, the directory should automatically be created when the user id is accessed. If not, you'll need to manually create the home directory with the OMVS mkdir /u/userid command. The second part is that the RACF profile (if your site doesn't use RACF, the other security packages also have mechanisms to do this) for the user id must be update to include the home directory and shell program (typically /bin/sh).


#1 Yep, thats the consensus we've come to internally.

#2 That seems to be the rub. This is a special Id and as such does not have a HLQ alias defined with its name in the Catalog. Normally we would just create a PRODID.xxxx.HFS zFS File System (where xxxx is the Node name) and it would be auto mounted. Thats how we do it for normal users, but again, this is a special user id and its not defined to the catalog. Now it does have the OMVS Segement set for RACF, but I'll have to check with the Security folks to determine the Home Directory settings.

Again thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts A directory in the pathname was not f... ABENDS & Debugging 0
No new posts Determining Active VM Directory All Other Mainframe Topics 0
No new posts Batch JCL to Copy from Unix Directory... JCL & VSAM 5
No new posts How efficient are you, while working ... General Talk & Fun Stuff 0
Search our Forums:

Back to Top