Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Anyone know how to copy Unix files?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
John Poulakos

New User


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

PostPosted: Wed Oct 10, 2018 12:57 am    Post subject: Anyone know how to copy Unix files?
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: 8410
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 10, 2018 1:31 am    Post subject:
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

New User


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

PostPosted: Wed Oct 10, 2018 7:16 pm    Post subject:
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

New User


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

PostPosted: Wed Oct 10, 2018 7:48 pm    Post subject:
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: 31
Location: NY

PostPosted: Wed Oct 10, 2018 7:52 pm    Post subject:
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: 1035
Location: Dublin, Ireland / Edinburgh, Scotland

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

Not sure if this would help but I found http://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: 8410
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 10, 2018 8:16 pm    Post subject:
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

New User


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

PostPosted: Wed Oct 10, 2018 10:01 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing SORTOF files in a PDS ajithajt SYNCSORT 3 Thu Dec 06, 2018 12:27 pm
No new posts PL/I read error for HFS files Joe Kirsch PL/I & Assembler 6 Fri Sep 28, 2018 9:13 pm
No new posts Need help on the multiple files refor... wik123 DFSORT/ICETOOL 7 Wed Sep 19, 2018 10:47 am
No new posts Merge two files and sum up the count ... preeti6 JCL & VSAM 6 Thu Sep 06, 2018 10:57 am
No new posts Splitting one record in a file to 10 ... mf_123 DFSORT/ICETOOL 9 Tue Aug 21, 2018 8:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us