Universal command manager UCOPY (zip file copy)



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Universal command manager UCOPY (zip file copy)

Postby chintu » Thu Mar 02, 2017 9:34 pm

Hello. We are using universal command manager in my project. And i used to copy text files via UCOPY command between two different unix servers. But now i have a new requirement. I have explained it below.

1. I have two servers UNIX and Windows. And the host is mainframe. I have to copy a file from Unix to Windows via mainframe. Its actually a .txt file but we have our extension for reconcialiation of cash. Its (.OURCASH)

2. Now i use UCOPY. And previously it was only one txt file. But this time there are 100s of ourcash files. So I zip those files in my Unix server and UCOPY the zip file to Mainframe and then to Windows.

3. The zip file comes to windows server succesfully and i unzip it using a batch script. NOW THE PROBLEM IS:

When i try to execute those files using goengine (A engine to convert some columns in the file into masked data, for security purpose). The JCL is failing.
But when i place the files manually in the Windows server(No JCL Involved ), The same goengine runs succesfully for the same files.

So is my file getting corrupted in the zip process???or during movement?? because i cant figure out, since i cannot see anything in the logs. Also, please note that If i place the files in My Unix server in BINARY MODE. Then the same mainframe process runs succdssfuly. But I cant place them as binary. I have to place them as ascii.

Please tell me if there is any JCL to work this out. Kindly tell me if you need more information
chintu
 
Posts: 14
Joined: Sun Jan 08, 2017 8:51 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Universal command manager UCOPY (zip file copy)

Postby Robert Sample » Thu Mar 02, 2017 9:42 pm

Unix and Windows are ASCII-based. Mainframes are EBCDIC-based. Copying a zip file to a mainframe in text mode WILL corrupt the data -- period. The ONLY way around this is to transfer the zip file as binary. If you say you cannot transfer in binary, then you have a problem -- the text transfer to the mainframe WILL change bytes and render the zip file corrupt. Either transfer the zip file (or any other file that contains non-display characters) to the mainframe as binary or get the mainframe out of the picture somehow -- those are your options.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Universal command manager UCOPY (zip file copy)

Postby chintu » Thu Mar 02, 2017 9:47 pm

Hi Robert

Thanks for the response.

I am using binary mode while transferring. Or else the zip file itself in Windows was coming invalid and the unzip batch script failed. But the problem here is what is inside the zip file.
I dont understand why the file inside it is not getting executed once i move it through JCL. I have even compared the files (once placed manualy and the ones placed through mainframe). Theres not even a single difference. Even the permissions remain same when i place either way. Please help me out here since this is supposed to be an automated process.
chintu
 
Posts: 14
Joined: Sun Jan 08, 2017 8:51 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post