MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP from mainframe to UNIX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination
View previous topic :: View next topic  
Author Message
gore
Beginner


Joined: 10 Dec 2002
Posts: 46
Topics: 20
Location: Providence, RI

PostPosted: Mon Apr 20, 2009 11:53 am    Post subject: FTP from mainframe to UNIX Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Mon Apr 20, 2009 12:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Apr 20, 2009 1:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
gore
Beginner


Joined: 10 Dec 2002
Posts: 46
Topics: 20
Location: Providence, RI

PostPosted: Mon Apr 20, 2009 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
gore
Beginner


Joined: 10 Dec 2002
Posts: 46
Topics: 20
Location: Providence, RI

PostPosted: Mon Apr 20, 2009 1:18 pm    Post subject: Reply with quote

It was locsite, typo, my bad.
_________________
Gore
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Mon Apr 20, 2009 1:25 pm    Post subject: Reply with quote

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 - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gore
Beginner


Joined: 10 Dec 2002
Posts: 46
Topics: 20
Location: Providence, RI

PostPosted: Mon Apr 20, 2009 2:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group