PDS Unload to Disk File & Download to PC

pts.
Tags:
Mainframe
I want to create a backup of a mainframe PDS (using IEBCOPY to unload the PDS), and then be able to download the resulting unloaded dataset to PC. The catch is I want to be able to upload the file again to a mainframe and then be able to run IEBCOPY from that uploaded dataset to restore the PDS. I have been able to create the original unloaded file on the mainframe, download it using FTP, then upload it again using FTP to a new file name with the same attributes as the original backup file. However, every time I try to run IEBCOPY to restore the uploaded dataset it fails. I'm typically receiving either a S-0C4 abend or a return code 8 from my IEBCOPY restore stating that the input file is not of valid unload format. Since I know the original unloaded dataset on the mainframe is good, I would guess that either the FTP download or upload is corrupting something in the unloaded PDS. I've tried using both binary and text file transmissions via FTP. The only pattern I've isolated is that if I use binary (for both the original download and the subsequent upload), I'm receiving the S-0C4 abend when I try to restore the uploaded file using IEBCOPY. If I use text transmissions in FTP, thats where I receive the return code 8 from IEBCOPY. Can anyone offer any insight as to what I'm doing wrong here? Thanks for your help!

Answer Wiki

Thanks. We'll let you know when a new response is added.

While it may not be relevant, what is in the PDS. From your description, it appears that you are talking about a load library that contains executable code. [Contrast this to a PDS with source code.]

We do this on a regular basis. And, we have had problems in the past, or some of our customers have had problems. In some cases, it is a problem with the particular file transfer tool being used.

While it is not as convenient, you may want to try the most basic approach: Instead of using whatever 3270 emulator you have, when you LOGON to TSO, stay at the READY prompt. Then, open a command prompt window on your PC. Use the SEND/RECEIVE command to transfer the file rather than any tool built into the emulator.

e.g., RECEIVE LoadLib.Bin a:’hlq.applic.Unload’

This format assumes:
1) Your 3270 session is ‘Session-A’
2) You have IND$FILE installed on TSO.
3) The default options for the RECEIVE are NOT
ASCII and/or CRLF. Either of these options turned on
will mess up the transfer.
4) The file ‘hlq.applic.UnLoad’ is the sequential file
created by unloading the PDS.
You should be able to reverse this process substituting SEND for the RECEIVE.

A couple of additional pointers:
1) Before you do the SEND to upload the file, you MUST
preallocate the target file on TSO. I have found that
it is rare that the allocation attributes provided by
the SEND and IND$FILE are acceptable. And, the attributes
must be identical to the original file.
2) Instead of specifically using IEBCOPY, try using the TSO
TRANSMIT and RECEIVE commands. *Theoretically* there should
be no difference. TRANSMIT and RECEIVE use IEBCOPY. But,
again from painful experience, there are times when TRANSMIT
and RECEIVE work after multiple failures from just using
IEBCOPY.

I hope this gets you started. As I said, we do this on a regular basis with no problems. But, I do avoid 3270 emulator file transfer tools. There appear to be some [unknown] problems because of special characters in EBCDIC that drive ASCII PCs nuts. One other tip: If you are going to transfer the downloaded file to another PC, over the Network or just by doing a copy, I recommend ZIPping the file first. Again, there are strange gremlins at work here.

Good luck.
CG

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Ccalvin
    Be sure that your FTP transfer is binary mode. For the my FTP I type bin on the line before the get statement. This will result in an untranslated copy of the PDS which is not readable on the PC.
    0 pointsBadges:
    report
  • Kcmitk
    I went through this some time ago and recall the following: iebcopy wont work on a load module, it writes undefined records and doesnt know how to put them back in correct format when thay go to a pc. send/receive interacts with iebcopy to write records that can be put back correctly. use it to create data set to be downloaded. you must use binary transfer for all files that you want to insure a correct restoral. a ftp going to a pc just creates a long string of data and vb/undefined attributes are lost, send/receive adjusts for this. if you dont use binary you may encounter problems with code page tables, if ftp was just installed with no mods the download defaults are probably not equal to upload for bits above X''128'. also your pc code page tables may not be compatable with the mainframe. a little work may be required to get send receive working, but once it is you should have no problems. i never did and i used it frequently.
    0 pointsBadges:
    report
  • CGatEdge
    kcmitk is absolutely correct. I had fogotten that, when we were using IEBCOPY, we had to write a pair of programs VB2FIX/FIX2VB to reformat the IEBCOPY files before and after the download/upload. But, as we both said, TRANSMIT/RECEIVE work very well and avoids a RYO solution. CG
    0 pointsBadges:
    report
  • CGatEdge
    kcmitk is absolutely correct. I had fogotten that, when we were using IEBCOPY, we had to write a pair of programs VB2FIX/FIX2VB to reformat the IEBCOPY files before and after the download/upload. But, as we both said, TRANSMIT/RECEIVE work very well and avoids a RYO solution. CG
    0 pointsBadges:
    report
  • PhilKeller
    One method I use with PDS's is to use an edit macro to paste member name in cols 73-80 across the entire PDS. I then copy the PDS to a flat file and download it. Not the perfect solution in terms of automation, perhaps, but I can restore any member with minimal effort.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following