syntax of mkdir in JCL or IDCAMS

JES2/3, JCL, utilities.

Topic author
peeterjoot
New Member
Posts: 9
Joined: Fri Mar 03, 2017 2:01 am
Has thanked: 4 times
Been thanked: 1 time

syntax of mkdir in JCL or IDCAMS

Postby peeterjoot » Thu Mar 23, 2017 9:28 pm

I'm able to use JCL and IDCAMS to populate a USS file:

Code: Select all

//PATH JOB
//CREATE   EXEC PGM=IDCAMS
//UNIX     DD PATH='unixfile',PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=SIRWXU
//JUNK     DD DATA,DLM=@@
a   
quick
brown
fox
@@ 
REPRO -
  INFILE(JUNK) -
  OUTFILE(UNIX)
/* 
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSTERM  DD SYSOUT=*


Is there an IDCAMS or JCL syntax to do the equivalent to mkdir, so that I can create the file in a subdirectory instead?



Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

Re: syntax of mkdir in JCL or IDCAMS

Postby Robert Sample » Thu Mar 23, 2017 9:58 pm

From the z/OS 2.1 JCL Reference manual on the PATHOPTS subparameter definitions (emphasis added by me):
OCREAT
Specifies that:

If the file does not exist, the system is to create it. If a directory specified in the pathname does not exist, one is not created, and the new file is not created.
If the file already exists and OEXCL was not specified, the system allows the program to use the existing file.
If the file already exists and OEXCL was specified, the system fails the allocation and the job step.
By the way, you're not the only one to complain about this -- here's 2010 comment on the same inability to create paths in JCL: https://groups.google.com/forum/#!topic ... VbV2pXODuk




Topic author
peeterjoot
New Member
Posts: 9
Joined: Fri Mar 03, 2017 2:01 am
Has thanked: 4 times
Been thanked: 1 time

Re: syntax of mkdir in JCL or IDCAMS

Postby peeterjoot » Thu Mar 23, 2017 11:20 pm

Thanks. From the link you posted, it looks like a STEP that runs BPXBATCH is the way to do it.




Return to “JCL - Job Control Language.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest