Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Transferring an ASCII coded file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Transferring an ASCII coded file
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    Post subject:
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    Post subject: Re: FTP ing an ASCII coded file
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

Site Director


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

PostPosted: Mon Oct 29, 2007 9:57 pm    Post subject:
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    Post subject: Thanks for your replies.
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    Post subject:
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

Site Director


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

PostPosted: Fri Nov 02, 2007 7:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us