IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Transferring an ASCII coded file


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
main_ani_frame

New User


Joined: 10 Aug 2007
Posts: 6
Location: Kolkata, India

PostPosted: Mon Oct 29, 2007 8:57 pm
Reply with quote

In my project, I am required to transfer an ASCII coded file from mainframe to desktop. I could do it using the 6 option (TSO or CLIST command). However when I tried to do the same using DOS shell, I could not. Could you please tell me how to do it using DOS shell?

I have another question in this regard. In order to transfer a file from mainframe to your desktop you write something like.....
IND$FILE GET 'ABC.OUTPUT' ASCII CRLF

Can someone please expand CRLF for me? I am just inquisitive about it.

Thanks!
Animall
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Oct 29, 2007 8:59 pm
Reply with quote

So when you FTP from the mainframe to a remote server using option 6 it is ok, but when you try to FTP from a PC to a remote server and try to put it doesn't work?

What are you FTP commands in both cases?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Oct 29, 2007 9:07 pm
Reply with quote

main_ani_frame wrote:
Hi all,

In my project, I am required to FTP an ASCII coded file from mainframe to desktop. I could do it using the 6 option (TSO or CLIST command). However when I tried to do the same using DOS shell, I could not. Could you please tell me how to do it using DOS shell?

I have another question in this regard. In order to FTP a file from mainframe to your desktop you write something like.....
IND$FILE GET 'ABC.OUTPUT' ASCII CRLF

Can someone please expand CRLF for me? I am just inquisitive about it.

Thanks!
Animall


IND$FILE is not FTP it is a file transfer program that is used with your terminal emulator. The ASCII CRLF indicates translate from EBCDIC to ASCII and add CRLF at the end of each record. FTP runs independent of your tso session. For DOS you would use something like:
Code:
FTP
OPEN you host name or IP address
USER userid
PASSWORD *******
GET 'ABC.OUTPUT' abc.txt
QUIT
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 29, 2007 9:57 pm
Reply with quote

Hello,

CRLF is Carriage Return/Line Feed. The CR moves the print position to pos 1 (left side), the line feed moves the "paper" down 1 line.

I suspect that you do not have a mainframe ASCII file. It is most likely EBCDIC text that will automatically be converted to ASCII during the FTP.

If you post the error(s) from your attempt at a command line FTP, someone will be able to explain what has happened.
Back to top
View user's profile Send private message
main_ani_frame

New User


Joined: 10 Aug 2007
Posts: 6
Location: Kolkata, India

PostPosted: Fri Nov 02, 2007 10:27 am
Reply with quote

Hi Stodolas, Craq and Dick,

The thing is that when I ftp ed the file using option 6, I clicked on the Receive files from host tool in the options tab, in the MVS/TSO tab I chose transfer type as text and in the Transfer option (file option) I checked out ASCII as it is meaningless to convert an ASCII file into ASCII format. That worked fine. But when I tried to go to Command Line and type ftp and then key in my PC s IP address and then type get <filename>, it did not work......

Thanks for your replies.
Animall.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Fri Nov 02, 2007 6:17 pm
Reply with quote

If you are connecting to your pc and typing GET <filename>, the file better live on your PC and it will be transferred to the mainframe. Otherwise, if it lives on the mainframe, and you are opening your FTP session from there to an FTP server on your pc you need to use a PUT <filename> instead.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 02, 2007 7:16 pm
Reply with quote

Hello,

Quote:
it did not work......
This is not the type of reply that will get you any help. . . You need to post what happened and any diagnostic info that was given. There are too many ways for something to "not work".

If you are on the desktop and want to "pull" a file from the mainframe, you may need to tell ftp that to download in ascii mode. Some software assumes binary and some uses "auto" that often fails. Once you are signed on to the mainframe ftp server, type ascii and press enter. You should get a response from the ftp server that the transfer type is now ascii. It won't hurt anything if it is already ascii.

If this does not fix your problem or at least change the symptoms, post all the info you have and we will continue. If you have success, please let us know. What you learn may help another sometime.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top