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

Anyone know how to copy Unix files?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Wed Oct 10, 2018 12:57 am
Reply with quote

Here is my JCL:
Code:
//CJPDPTRN JOB (COPY),MSGCLASS=H,CLASS=A,NOTIFY=&SYSUID,REGION=0M 
//COPYSTEP EXEC PGM=IKJEFT01                                       
//INHFS  DD PATH='/u/cjpdp/wsdl/ResetQue.wsdl'                     
//OUTHFS DD PATH='/usr/lpp/cicsts/cicsts42/TRNG/wsdl/ResetQue.wsdl'
//SYSTSPRT DD SYSOUT=*                                             
//SYSTSIN  DD *                                                   
OCOPY INDD(INHFS) OUTDD(OUTHFS)                                   
/*     


I am getting a JCL ERROR and this message:
Code:
IEFA107I CJPDPTRN COPYSTEP OUTHFS - DATA SET ...PATH=.SPECIFIED... NOT FOUND 

I verified the path does exist. Here is the screen:

Code:
  Menu  Utilities  View  Options  Help                                         
                                                                               
                           z/OS UNIX Directory List            Row 1 to 5 of 5
Command ===>                                                  Scroll ===> CSR 
                                                                               
Pathname . : /usr/lpp/cicsts/cicsts42/TRNG/wsdl                               
EUID . . . : 1003                                                             


I have tried about 8 times with different files and always get the same error.

Mod edit: We find it much esier to read code and data if you use the code tags. I have done it for you this time.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Oct 10, 2018 1:31 am
Reply with quote

IIRC, the default if you don't specify PATHOPTS is for read-only. Try this:
Code:
//CJPDPTRN JOB (COPY),MSGCLASS=H,CLASS=A,NOTIFY=&SYSUID,REGION=0M
//COPYSTEP EXEC PGM=IKJEFT01
//INHFS DD PATH='/u/cjpdp/wsdl/ResetQue.wsdl'
//OUTHFS DD PATH='/usr/lpp/cicsts/cicsts42/TRNG/wsdl/ResetQue.wsdl',
//     PATHOPTS=(OWRONLY)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
 OCOPY INDD(INHFS) OUTDD(OUTHFS)
/*
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Wed Oct 10, 2018 7:16 pm
Reply with quote

Thank you, Robert.

That didn't work... same error. But, you seem to know a lot more about it than I do. I tried something a little different... I manually created the output file, then ran my JCL and it copies over the file I manually created just fine. Where it doesn't work is when I am trying to copy a new file to an existing directory.

I need to get this to work in batch for part of a change management process. Otherwise, I would just say "to hell with it" and do it manually.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Wed Oct 10, 2018 7:48 pm
Reply with quote

Update:

Thanks again, Robert.

I did a little more searching on OWRONLY and found if I added OCREAT to OWRONLY it gets past the JCL error:

PATHOPTS=(OWRONLY,OCREAT)

Now I get "permission denied", but at least that's a message I understand.
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 42
Location: NY

PostPosted: Wed Oct 10, 2018 7:52 pm
Reply with quote

This is what I use when copying within unix.

Code:
//HFS2HFS JOB (XX,XX,123,00),'ME',MSGCLASS=X,MSGLEVEL=(1,1),
// CLASS=A,NOTIFY=&SYSUID
//**********************************************
//* COPY HFS 2 HFS
//**********************************************
//STEP003  EXEC PGM=IKJEFT01
//SYSTSPRT  DD SYSOUT=*
//SYSPRINT  DD SYSOUT=*
//STDERR    DD SYSOUT=*
//STDOUT    DD SYSOUT=*
//HFSIN    DD PATH='/u/me/normalFTP.txt',
//            PATHOPTS=(ORDONLY)        <<< READ ONLY
//HFSOUT   DD PATH='/u/me/java/normalFTP.txt',
//            PATHOPTS=(OCREAT,ORDWR,OTRUNC),
//            PATHMODE=(SIRUSR,SIRGRP,SIROTH,SIWUSR,SIWGRP,SIWOTH)
//SYSTSIN   DD *
 OCOPY INDD(HFSIN) OUTDD(HFSOUT)
/*
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1104
Location: Dublin, Ireland

PostPosted: Wed Oct 10, 2018 8:05 pm
Reply with quote

Not sure if this would help but I found billlalonde.tripod.com/oejcl.htm which has PATHOPTS=(ORDWR,OTRUNC,OCREAT) and which it says "we intend to read/write it, we will create it if it doesn't exist and we will overwrite it if it does".

If your file is new, it is not found and you don't have the option to create it in your current PATHOPTS ? (is what I'm thinking).

Garry.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Oct 10, 2018 8:16 pm
Reply with quote

Glad to hear you got past the error. The "permission denied" message can be caused by any directory in the path -- so at least one directory in /usr/lpp/cicsts/cicsts42/TRNG/wsdl/ has permissions set to deny you access. You may need to work with your site support group to get you access, or change the directory permissions.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Wed Oct 10, 2018 10:01 pm
Reply with quote

Thanks guys, for lots of good info.

I'm always doing something that causes permission or authorization errors, so I'm not concerned. The systems programmer is over-zealous about security. The DBA doesn't even have authority to move bind images into the DBRM lib. This all makes setting up a change management system a real challenge.
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 Print report for each record from mul... CA Products 1
No new posts Get two files from one file with diff... DFSORT/ICETOOL 10
This topic is locked: you cannot edit posts or make replies. I HAVE 2 INPUT FILES WITH SAME LAYOUT... COBOL Programming 6
This topic is locked: you cannot edit posts or make replies. include and copy COBOL Programming 4
No new posts DFDSS COPY using Filter REFDT statement JCL & VSAM 2
Search our Forums:

Back to Top