Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to copy z/OS dataset to USS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Thu Jul 26, 2012 7:25 pm    Post subject: How to copy z/OS dataset to USS file
Reply with quote

I'm trying to copy z/OS dataset to USS file using the JCL below
but get a error

JCL
Code:

//COPYSTEP EXEC PGM=IKJEFT01                         
//INMVS DD DSN=EV6946.USS.TO.MVS,DISP=OLD             
//OUTHFS DD PATH='/SYSTEM/tmp/EV605H.GV55.DS.SLD9998'
//SYSTSPRT DD SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               
//SYSTSIN DD *                                       
OCOPY INDD(INMVS) OUTDD(OUTHFS) TEXT                 
/*                                                   


Error
Code:

READY                                                                           
OCOPY INDD(INMVS) OUTDD(OUTHFS) TEXT                                           
RETURN CODE 0000006F, REASON CODE 00000004.  AN ERROR OCCURRED DURING THE OPENING OF HFS FILE /SYSTEM/tmp/EV605H.GV55.DS.SLD9998.
READY                                                                           
END                                                                             


I read the sample below
http://publib.boulder.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2Fcom.ibm.zos.r13.bpxa500%2Ftsoocopy.htm

could anyone tell me what's wrong with my code ?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7993
Location: Bellevue, IA

PostPosted: Thu Jul 26, 2012 7:39 pm    Post subject: Reply to: How to copy z/OS dataset to USS file
Reply with quote

The 6F return code is given as "Permission is denied" in the Unix System Services MAC manual. The user id the job ran under does not have write access to at least one of the directory levels in your path name, or the file already exists and the user id cannot write to that file.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Fri Jul 27, 2012 7:27 am    Post subject: Re: Reply to: How to copy z/OS dataset to USS file
Reply with quote

Robert Sample wrote:
The 6F return code is given as "Permission is denied" in the Unix System Services MAC manual. The user id the job ran under does not have write access to at least one of the directory levels in your path name, or the file already exists and the user id cannot write to that file.


Thank you Robert !

I add a Permission Parm and create file in DD like below , it worked !

Code:

//COPYSTEP EXEC PGM=IKJEFT01                                 
//INMVS DD DSN=EV6946.USS.TO.MVS,DISP=OLD                   
//OUTHFS DD PATH='/SYSTEM/tmp/EV6946.MVS.TO.USS2',           
//         PATHOPTS=(OCREAT,OWRONLY),PATHMODE=(SIRUSR,SIWUSR)
//SYSTSPRT DD SYSOUT=*                                       
//SYSPRINT DD SYSOUT=*                                       
//SYSTSIN DD *                                               
OCOPY INDD(INMVS) OUTDD(OUTHFS) BINARY CONVERT(NO)           
/*                                                           
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 5 Fri Mar 24, 2017 2:24 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us