IEBCOPY to copy from data from mainframe to desktop

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
sandeepmudgal2k
Member
Posts: 16
Joined: Thu Aug 31, 2006 11:17 pm
Location: pune india

IEBCOPY to copy from data from mainframe to desktop

Post by sandeepmudgal2k » Tue Apr 27, 2010 5:43 pm

Hi,

I want to copy mainframe PS or PDS on windows/PC/Desktop using IEBCOPY in some batch job.
Can you please provide any help on this. I can not do FTP, but i heard that FTP protocol is nothing but IEBCOPY. So being a generic utility i can use this in our product.

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Tue Apr 27, 2010 7:12 pm

IEBCOPY is a dataset utility that is used to copy or merge members between one or more partitioned data sets, in full or in part. You can also use IEBCOPY to create a backup of a partitioned data set into a sequential data set (called an unload data set or PDSU), and to copy members from the backup into a partitioned data set.

So, you can use IEBCOPY to copy a PDS. You can use IEBCOPY to unload a PDS to a backup, and subsequently reload a PDS from that backup. If your goal is to simply use IEBCOPY to create the unload, and then store that unload file off of a mainframe for some future use, then yes, IEBCOPY will work. If your goal is to have useable copies of that data elsewhere, then IEBCOPY is not the right tool.

If the goal is to have to have copies of the PDS members which you can read and use elsewhere, then you need something else. You can use a utility such as IEBPTPCH to copy selected PDS members into a sequential dataset, which can then be used elsewhere. I've heard of some folks who use the TSO TRANSMIT command to convert a PDS into a sequential XMIT (.xmi) file. There are third-party tools that allow you to use .xmi formatted files in a Windows environment. If you have PKZIP available you can create a .zip archive of a PDS or dataset or even a mixture of both.

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Tue Apr 27, 2010 7:14 pm

Also remember that data on the mainframe is encoded in EBCDIC, and for a "windows/PC/Desktop" environment it would have to be encoded in ASCII for it to be readable/useable.

sandeepmudgal2k
Member
Posts: 16
Joined: Thu Aug 31, 2006 11:17 pm
Location: pune india

Post by sandeepmudgal2k » Wed Apr 28, 2010 9:22 am

Thanks for quick reply.

Yes i want to unload mainframe data on to PC and i will keep this data in .TXT format for my purpose. i did google but could not find any good help. can i get some link to read on it OR cn i get some piece of jcl code dealing with IEBcopy.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Apr 28, 2010 1:36 pm

Before we can help you need to tell us your goal - read the reply from MrSpock again and try to understand what does he mean. Unless, you tell us what exactly you are doing, solution from us might/might not work for you...
Regards,
Anuj

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Apr 28, 2010 1:44 pm

Here is a link to IEBCOPY (Library Copy) Program

and as MrSpock indicated, IEBCOPY is not a transmission program
(mainframe to pc and pc to mainframe)
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

MikeJ024
Member
Posts: 12
Joined: Wed Jun 18, 2008 1:36 pm

Post by MikeJ024 » Wed Apr 28, 2010 3:29 pm

hi, I would also like to know how to transfer flat files & pds members & a whole Load Library down to my pc & then I will transfer the files to a jump drive. I nolonger have access to 3480.90e Cart. drives as they have moved them from the NYC area to South Dakota. I have access to attachmate extra to do the file transfers itself but need to know whats to set in Extra for both download to the PC & for later to upload back to the mainframe. I know I can do each seq. flat file & flat PDS members. but I need a complete method for handling a LOAD library. without this I have no way to backup my progs & files except locally, Plz help me

sandeepmudgal2k
Member
Posts: 16
Joined: Thu Aug 31, 2006 11:17 pm
Location: pune india

Post by sandeepmudgal2k » Wed Apr 28, 2010 5:48 pm

Ok. I got what MrSpock said. Actually my requirement is dat " we have to transfer PDS/PS data from mainframe to my desktop in TXT format. I can not use FTP utility for this.
I did google on it and found one option which is FILEXFER, which i can use in one REXX pgm. but still i have some proble with "ISPEXEC WSCON IP(IPADDR) CODEPAGE(0037) CHARSET(0697) NOGUIDSP" statement in my rexx pgm and it is showing following error.
-----------------------------------------------------------------------------
ISPX010

Transfer failed
The FILEXFER service failed because there is no connection to the
workstation.

Current dialog statement:
ISPEXEC FILEXFER WS(WSFN) HOST(OUTFILE) TO(HOST)
------------------------------------------------------------------

So i m unable to do file transfer. Rexx pgm what i used is
/* REXX */
IPADDR = '*'
OUTFILE = 'ITG47D.REXX.PROG'
WSFN = 'C:\sandeeptest\test.txt'
/* WSCON - CONNECT TO THE WSA */
"ISPEXEC WSCON IP(IPADDR) CODEPAGE(0037) CHARSET(0697) NOGUIDSP"
IF RC>0 THEN
"ISPEXEC FILEXFER WS(WSFN) HOST(OUTFILE) TO(HOST)"
IF RC=0 THEN
SAY SUCCESS
Please let me know the solution.

sandeepmudgal2k
Member
Posts: 16
Joined: Thu Aug 31, 2006 11:17 pm
Location: pune india

Post by sandeepmudgal2k » Wed Apr 28, 2010 6:11 pm

I have got successful run of REXX pgm RC=0 but i did not get any file on my PC at specified location.

RExx PGM is as follows
-----------------------------------------/* REXX */
IPADDR = 'My PC's IP Address'
OUTFILE = 'Zxmudga.REXX.PROG'
WSFN = 'C:\sandeeptest\test.xmit'
/* WSCON - CONNECT TO THE WSA */
"ISPEXEC WSCON IP(IPADDR) CODEPAGE(0037) CHARSET(0697) NOGUIDSP"
IF RC=0 THEN
"ISPEXEC FILEXFER WS(WSFN) HOST(OUTFILE) TO(HOST)"
IF RC=0 THEN
SAY SUCCESS
---------------------------------------------------------------
Why it is happening, i did search on it again but no success.

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Wed Apr 28, 2010 6:23 pm

"ISPEXEC FILEXFER WS(WSFN) HOST(OUTFILE) TO(HOST)"

Are you sure you want to go TO(HOST)? I thought you wanted to transfer to the workstation?

sandeepmudgal2k
Member
Posts: 16
Joined: Thu Aug 31, 2006 11:17 pm
Location: pune india

Post by sandeepmudgal2k » Wed Apr 28, 2010 6:36 pm

Thanks for quick reply. Yes u r right. I changed it with TO(WS), but still no output file on my pc.

sandeepmudgal2k
Member
Posts: 16
Joined: Thu Aug 31, 2006 11:17 pm
Location: pune india

Post by sandeepmudgal2k » Wed Apr 28, 2010 7:02 pm

I have one more question. I have given complete REXX code to u in above conversation. Dat all code i m using to do file transfer. but i think i need to login to mainframe server for doing file transfer. This is same as we do for FTP. Actually i m getting RC=16 in "ISPEXEC WSCON IP(IPADDR) CODEPAGE(0037) CHARSET(0697) NOGUIDSP" line.
.What u say. even if i need to do

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Wed Apr 28, 2010 8:47 pm

- What does RC=16 mean for the WSCON service?
- Is the TCP/IP address correct?
- Is the Workstation Agent installed, configured, and running properly?
- Did this, or does this, process work if you do it manually?

sandeepmudgal2k
Member
Posts: 16
Joined: Thu Aug 31, 2006 11:17 pm
Location: pune india

Post by sandeepmudgal2k » Thu Apr 29, 2010 10:28 am

1. 16 Cannot connect to workstation.
2. FOR TCP/IP address i gave my workstation IP address.
3. I have to check my tech support group for this.
4. manually i never tried. as first time i m working on this method, otherwise we were using FTP for this.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others