Hi All
I am trying to copy a file from Windows server to Unix Server using JCL code.
//CPYFR01 EXEC CPYUTIL
//UNVOUT DD DSN=&&UCMDFR01,DISP=(,PASS,DELETE),
// DCB=(BLKSIZE=70000,LRECL=2048,RECFM=FB),
// UNIT=SYSDA,
// SPACE=(2048,(500,500),RLSE),AVGREC=K
//UCMDOPT DD DISP=SHR,DSN=IC.D2C.UCMDOPT.FILE(WINUSERID)
//SYSIN DD *
-host WindowsServerName
-userid WINUSERID
-x UCMDOPT
-cmd "UCOPY \\SOURCESERVER\PATH1\ABC.txt"
//CPYTO01 EXEC CPYUTIL
//UNVIN DD DSN=&&UCMDFR01,DISP=OLD
//UCMDOPT DD DISP=SHR,DSN=IC.D2C.UCMDOPT.FILE(UNXUserID)
//SYSIN DD *
-cmd "ucopy > /app/path1/ABC.txt"
-host UnixServerName
-userid UNXUserID
-x UCMDOPT
-stdout -mode binary
/*
The Record delimiter of the file is automatically getting converted from 'CRLF' (dos format) to 'LF' (unix format)
Is there any way to transfer the file from Windows to Unix server without changing the Record Delimiter?
Thanks in Advance.
Regards
Rahul
Copy a text file from Windows to unix
-
- Posts: 1
- Joined: Mon Apr 22, 2013 3:57 pm
- Skillset: JCL
- Referer: online
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Copy a text file from Windows to unix
How is this a mainframe issue?
Talk to your site support group, or whoever supports the CPYUTIL function (which is NOT a standard part of z/OS), on how to do a binary transfer. The default line terminator for Windows is CR/LF and the default line terminator for Unix is LF so the behavior you are seeing is normal and expected.
Talk to your site support group, or whoever supports the CPYUTIL function (which is NOT a standard part of z/OS), on how to do a binary transfer. The default line terminator for Windows is CR/LF and the default line terminator for Unix is LF so the behavior you are seeing is normal and expected.
Re: Copy a text file from Windows to unix
Robert Sample wrote:How is this a mainframe issue?
Talk to your site support group, or whoever supports the CPYUTIL function (which is NOT a standard part of z/OS), on how to do a binary transfer. The default line terminator for Windows is CR/LF and the default line terminator for Unix is LF so the behavior you are seeing is normal and expected.
Hi,
Can I have a sort card to have the matched records in two files if possible?
- Akatsukami
- Global moderator
- Posts: 1058
- Joined: Sat Oct 16, 2010 2:31 am
- Skillset: Rexx, JCL, DB2/SQL, TSO/ISPF, PL/I
- Referer: ibmmainframes
- Location: Bloomington, IL
- Contact:
Re: Copy a text file from Windows to unix
Rajesh K wrote:Robert Sample wrote:How is this a mainframe issue?
Talk to your site support group, or whoever supports the CPYUTIL function (which is NOT a standard part of z/OS), on how to do a binary transfer. The default line terminator for Windows is CR/LF and the default line terminator for Unix is LF so the behavior you are seeing is normal and expected.
Hi,
Can I have a sort card to have the matched records in two files if possible?
No.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Copy a text file from Windows to unix
Rajesh K, you have been given your answer. Do not attempt to hijack other posts to get what you want; none of the senior people on this forum have provided you a sort statement and it is EXTREMELY unlikely at this point that any will. Hence any sort statement you get is more likely to come from somebody with no more experience then you have and that reduces the chances of it being correct to very low.