View previous topic :: View next topic |
Author |
Message |
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Mon Apr 20, 2009 11:53 am Post subject: FTP from mainframe to UNIX |
|
|
I have to transfer a file from mainframe to a UNIX box. My FTP jo is on mainframe. Requirement is to have End of record character as CRLF on the file that gets FTPed to UNIX not the default UNIX end of record character.
I have read all forums and searched but could not find anything that works.
My guess is this should work:
SITE MBSENDEOL=CRLF but i get crazy results
500 'SITE MBSENDEOL=CRLF ' : Command not understood.
Do I have to give ENCODING= MBCS
I can't find an example in manuals so I need someone to give me an exact command that can possibly work.
I hate to say that but links to manual have not been helpful.
I really appreciate all the help people are providing.
[/img] _________________ Gore |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Apr 20, 2009 12:56 pm Post subject: |
|
|
gore,
As far as I remember UNIX only needs LF , it is WINDOWS which needs both CR and LF. Why do you need CR in the first place as Unix doesn't expect it to be there. |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Mon Apr 20, 2009 1:06 pm Post subject: |
|
|
Think it through logically for a minute.
You said that you're running the FTP process on the mainframe. That means that the mainframe is the client (local) machine and Unix is the server (remote) machine.
The site command is used to send site-specific information to the remote host. That's not what you want to do.
You want to use the locsite command to send commands to the local host. Normally, you'd use the sbsendeol command which "specifies which end-of-line sequence to use when ENCODING is SBCS, the data transfer type is ASCII, and data is being sent to the server". |
|
Back to top |
|
|
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Mon Apr 20, 2009 1:16 pm Post subject: |
|
|
Kolusu in response to your very valid questions.
The other vendor has developed a ton of applications that uses PC end of record instead of UNIX standard. We have been asked to change FTP to accomodate them. _________________ Gore |
|
Back to top |
|
|
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Mon Apr 20, 2009 1:18 pm Post subject: |
|
|
It was locsite, typo, my bad. _________________ Gore |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Apr 20, 2009 1:25 pm Post subject: |
|
|
gore,
OK in that case insert a CR(X'0D') using any utility program like sort and FTP it over to unix which would set the LF.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input file,DISP=SHR
//SORTOUT DD DSN=your file to ftp,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(n:X'0D')
//*
//* n = your file lrecl+1
|
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Mon Apr 20, 2009 2:23 pm Post subject: |
|
|
Thanks Kolusu and superK . Actually we do not have the option of coding any mainframe application or utility, I guess we will have to ask them to write a utility to do it as this involves a ton of application. _________________ Gore |
|
Back to top |
|
|
|
|