MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OCOPY JCL to copy PDS to unix folder

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Other Technical Topics
View previous topic :: View next topic  
Author Message
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Sun Feb 21, 2021 10:56 pm    Post subject: OCOPY JCL to copy PDS to unix folder Reply with quote

Hi,

Could someone help me with the jcl

Code:

//COPYSTEP EXEC PGM=IKJEFT01                           
//IN       DD DSN=YOUR.PDS(MEM1),DISP=SHR     
//OUT      DD PATH='/u/userid/cobol/',PATHDISP=(KEEP),
//            PATHOPTS=(OWRONLY)                       
//SYSTSPRT DD SYSOUT=*                                 
//SYSTSIN  DD *                                         
OCOPY INDD(IN) OUTDD(OUT) BINARY                       
/*     



getting following error.

Code:

RETURN CODE 0000007B, REASON CODE 05620064.  AN ERROR OCCURRED DURING THE OPENING OF HFS FILE /u/userid/cobol/. 


Folder access
Code:

/u/userid: # ls -ld '/u/userid/cobol/'                               
drwxrwxrwx   2 USERID  PROFILE      0 Feb 21 20:18 /u/userid/cobol/


Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12365
Topics: 75
Location: San Jose

PostPosted: Mon Feb 22, 2021 10:29 am    Post subject: Reply with quote

Magesh_J,

Try coding the PATHOPTS as follows

Code:

PATHOPTS=(OWRONLY,OCREAT,OEXCL)

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Feb 24, 2021 3:22 pm    Post subject: Reply with quote

Hi Kolusu,

Thanks for the response.

I am getting the following error.

Code:

IEF344I USERIDA COPYSTEP OUT - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
IGD17501I ATTEMPT TO OPEN A HFS FILE FAILED,                                   
RETURN CODE IS (00000075) REASON CODE IS (05620063)                             
FILENAME IS (/u/userid/cobol/)


then I tried changing the JCL by giving the file name

I got following error
Code:

RETURN CODE 0000006F, REASON CODE EF076015.  AN ERROR OCCURRED DURING THE OPENIN


but I was able to achieve it thru 'CP' command from Unix(OMVS).

Code:

CP "//'your.pds'"  '/target/folder'


Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12365
Topics: 75
Location: San Jose

PostPosted: Thu Feb 25, 2021 11:07 am    Post subject: Reply with quote

Magesh_J wrote:
Hi Kolusu,

Thanks for the response.

I am getting the following error.

Code:

IEF344I USERIDA COPYSTEP OUT - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
IGD17501I ATTEMPT TO OPEN A HFS FILE FAILED,                                   
RETURN CODE IS (00000075) REASON CODE IS (05620063)                             
FILENAME IS (/u/userid/cobol/)



Magesh_J,

The return and reason code is
Code:

0075   | JRSpFileExists                                               
       | The file specified on the mknod service already existed.     
       | Action: A file by this name exists. The mknod service request
       | cannot be processed. Correct the name and retry the         
       | operation.                                                   


0063   | JRFileExistsExclFlagSet                                   
       | The file exists, but O_EXCL is specified on the open call.
       | Action: The open service request cannot be processed.     
       | Correct the name or the open flags and retry the operation.



You need to specify the file name on the PATH name.

You can issue the command TSO ISH and the press enter. You can specify the path /u/userid/cobol/ on the panel and then verify that the member you copied exists. Now for testing you can specify a different name. Fyi you can use DFSORT to copy to zFS file system

something like this
Code:

//STEP0100 EXEC PGM=SORT                       
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD DISP=SHR,DSN=YOUR.PDS(MEM1)
//SORTOUT  DD PATH='PATH='/u/userid/cobol/newmem.txt',         
//         PATHMODE=(SIRWXU,SIRWXG,SIRWXO),     
//         PATHOPTS=(OWRONLY,OCREAT,OEXCL),     
//         PATHDISP=(KEEP,DELETE),FILEDATA=TEXT,
//         LRECL=80,RECFM=FB     
//SYSIN    DD *                                 
  OPTION COPY
/*                       

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Other Technical Topics All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group