IND$FILE transfer from PC to Mainframe missing End-Of-Line.



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

IND$FILE transfer from PC to Mainframe missing End-Of-Line.

Postby tmohnin » Fri Mar 21, 2014 2:49 am

I am using File Transfer 'Send to Host' within PASSPORT to transfer files from my PC into the mainframe. This uses the command 'IND$FILE PUT FILENAME.DATA ASCII CRLF' to transfer the data from my PC to the mainframe. I usually work with PC files I have created as CSV files to transfer my data. In this case, I have received a *.DAT file from another source that I need to transfer to the mainframe. It is variable length, delimited with a | rather than a comma. When I upload it with my usual settings, it does not seem to have an end-of-line marker and thus is wrapping the first few bytes of the next line onto the end of the previous one (see below for example or what the file looks like on the mainframe). This makes it impossible to read accurately on mainframe. In the past, when I've ran into this problem, I discovered I could export the file into Excel and rewrite it as a CSV so that when uploading I had the end-of-line markers I needed. This *.DAT file however is too big for me to read into Excel so that is not an option. My question is how can download this cleanly into the mainframe.

Record1Field1|Record1Field2|Record1Field3|Recor
d2Field1|Record2Field2|Record2Field3|Record3Fie
ld1|Record3Field2|Record3Field3|Record4Field1|R
ecord4Field2|Record4Field3

Can anyone help me with settings on the IND$FILE to allow my upload to work properly? In my File Transfer Scheme I have the File Type set to Text and the Host OS set to TSO. I have tried checking and emptying the check box for 'Remove End of File indicator on Receive'.
tmohnin
 
Posts: 1
Joined: Fri Mar 21, 2014 2:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: IND$FILE transfer from PC to Mainframe missing End-Of-Li

Postby prino » Fri Mar 21, 2014 2:58 am

Pre-allocate the file as VB with an LRECL=32760 (or whatever may be the longest line in your PC file).
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: IND$FILE transfer from PC to Mainframe missing End-Of-Li

Postby Robert Sample » Fri Mar 21, 2014 6:05 am

If the originating system is UNIX-based, you won't have a CR/LF combination in your PC file -- Unix uses only a line feed for the line terminator. If this is the case, you will need to find a way to convert the Unix line terminators to Windows line terminators before the IND$FILE is invoked.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: IND$FILE transfer from PC to Mainframe missing End-Of-Li

Postby dick scherrer » Fri Mar 21, 2014 7:05 pm

Hello and welcome to the forum,

FWIW - my clients have had much more success using FTP rather than IND$FILE.

Is FTP available to you? Is there some business reason to use IND$FILE?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post