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
 

 

FTP is insertng cr/lf and removing trailing blanks

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
dick scherrer

Site Director


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

PostPosted: Mon Aug 27, 2012 9:29 pm    Post subject: FTP is insertng cr/lf and removing trailing blanks
Reply with quote

Hello,

I didn't realize 'til now that the tso/ispf part of the forum is where ftp questions are handled . . .

One of my users stopped by with a situation that they use WS_FTP Pro to download a file to the PC from z/OS and when the file is stored on the pc, trailing blanks are removed and a cr/lf is inserted. Normally this is not a problem for them locally, but when they send this to another organization, the "short" records cause a problem for the receiver. This a is a new process and gthis is the first time thru . . .

Once upon a time i remember being able to specify CRLF or NOCRLF. There was also a SET .... NOCRLF (.... = SITE or LOCSITE?). I also seem to recall a way to specify keeping or deleting trailing spaces.

Their problem is that the code on neither end can be changed, but they still need to get the data downloaded/uploaded.

Anyone remember what i've forgotten or has this been another imaginary memory from long ago? I've not actually set up any new transfer processes for any users for quite a while. What i need to do most days, is just use whatever ftp is on the box i'm using and it tends to work icon_rolleyes.gif

I did try to send the data as an external attachment to an e-mail (XMITIP), but the record length is greater than smtp allows. Interestingly, XMITIP did show the "chopped" length.

Thanks,

d
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Mon Aug 27, 2012 9:58 pm    Post subject:
Reply with quote

Specify
Code:
SITE TRAILINGBLANKS
to turn off the behavior. You might need
Code:
QUOTE LOCSITE TRAILINGBLANKS
if the z/OS machine is the client.

SBSENDEOL is the option to control whether LF, CR, CRLR, or NONE is sent for line terminators.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Aug 27, 2012 10:06 pm    Post subject: Reply to: FTP is insertng cr/lf and removing trailing blanks
Reply with quote

Try using XMIT with the OUTDSN parameter and then downloading the outdsn as a binary file.

You cannot use the file on the PC, but it useful when the transfer is z/OS -> windows -> z/OS.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Mon Aug 27, 2012 10:58 pm    Post subject:
Reply with quote

I have seen workarounds that use "fixed variable" format. You create the host data set as VB, but you ensure that each record is padded to its maximum allowable length. Some file transfer tools (I don't recall which ones) can interpret the RDW and insure that the receiving file ends up with the same record length as the original data set. http://ibmmainframes.com/viewtopic.php?t=27825
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: Tue Aug 28, 2012 7:06 pm    Post subject: Reply to: FTP is insertng cr/lf and removing trailing blanks
Reply with quote

Hello,

Thanks for the replies.

So far, no progress . . . icon_sad.gif

A bit more info:
The "piece in the middle" is Windows-7 where the client runs to pull from the mainframe ftp server.

Found that an out-of-date of WS_FTP has been installed. Talked with the people at Ipswitch and found that the version being used is not (and was never) intended to run on Win-7. There are Many deocumented issues.

So, i'm trying to use the ftp available at the command prompt.
SITE TRAILINGBLANKS is an "invalid command" as is SITE or "SITE ?"
SBSENDEOL {whatever} returns the same.

Quote:
then downloading the outdsn as a binary file.
You cannot use the file on the PC, but it useful when the transfer is z/OS -> windows -> z/OS.
When working, this process will download the file from a mainframe, then (changing to a secure ftp client) will upload the file to a UNIX system.

Quote:
You create the host data set as VB . . .
The file is created by a remote system that will not even talk about changing the file (seems like this file is sent thousands of places and they do not entertan creating custom versions as they do not want the maintenance).

Internally, the IT people here do not want to "touch" the file, merely receive it and send it along. I'd prefer the UNIX system get it from the mainframe directly, but due to contracts, they are not allowed. By contract, we are allowed to download and the UNIX system has a contract that we send them this data. Such fun . . . icon_wink.gif

I'm working on getting an upgrade to the ftp product but that often does not happen overnight . . .

I'm also continuing to experiment here and will post an update if i learn anything.

Thanks for the help.

d
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Tue Aug 28, 2012 7:36 pm    Post subject:
Reply with quote

Try
Code:
QUOTE SITE TRAILINGBLANKS SBSENDEOL ...
the QUOTE lets the PC pass the SITE command to the z/OS system.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 961
Location: Richmond, Virginia

PostPosted: Tue Aug 28, 2012 7:56 pm    Post subject:
Reply with quote

In the meantime, to get your stuff done, can you change the mainframe blanks to some other unused value and then reconvert whatever that maps to to ascii blanks after the xmit?
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: Tue Aug 28, 2012 9:19 pm    Post subject: Reply to: FTP is insertng cr/lf and removing trailing blanks
Reply with quote

Hello,

Thanks for the thought Phil, but the user is not willing to "touch" the file at all. To do this, the mainframe file would have to be "changed" as well as the file after download on the pc.

Robert,
Code:
QUOTE SITE TRAILINGBLANKS SBSENDEOL

Worked Quite well icon_biggrin.gif
'Preciate it!

I'll update if there is anything to tell, but it looks like we're good to go.

d
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Tue Aug 28, 2012 10:01 pm    Post subject:
Reply with quote

Glad to hear it worked.
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 Apr 18, 2014 1:55 am    Post subject:
Reply with quote

Don't know if this should be a new topic or as it is more FTP related, I left it here. . . I'll be happy to split it if that is better.

With the same set of users, but a different requirement, we now have a multi-gig file that has been sent to our world and the entire file looks like one big record . . . When it is ftp'd to the mainframe it has a record too long issue and will not transfer.

Is there any way I can force the upload to insert a cr/lr every so many characters (record).

Or might I be able to upload this into an OMVS dataset and then manipulate it? Preferably with some standard utility in OMVS/uss.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Apr 18, 2014 2:06 am    Post subject:
Reply with quote

Can you not use LOCSITE LRECL=value?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Fri Apr 18, 2014 2:15 am    Post subject:
Reply with quote

If it was sent as a binary file, you'll need to FTP it to OMVS, then use iconv on it before moving it to z/OS.

If it was sent as a text file, it most likely has Unix (LF) line terminators which won't allow the records to be separated on z/OS when z/OS sees the file coming from a Windows machine. You might be able to determine this by doing a HEX edit (TSO/ISPF for example) on the data set and checking for the LF character (depending on the code page, it will usually be X'15' or X'25') in the record. There's several options that can be used with QUOTE SITE / QUOTE LOCSITE to determine end-of-line behavior; check the manual for the option(s) you need.
Back to top
View user's profile Send private message
James Halley

New User


Joined: 11 Apr 2012
Posts: 17
Location: USA

PostPosted: Mon Apr 21, 2014 10:57 pm    Post subject:
Reply with quote

Yes, this sounds like a Unix-type line terminator issue I last encountered about 15 years ago.

There may be better ways to do it now but I think we used Programmers File Editor (PFE) to convert the file to one acceptable to z/OS.

I still occasionally use PFE on Win7 and see that it can still be downloaded from http://www.lancaster.ac.uk/~steveb/cpaap/pfe/

Open your file with PFE, select Options ... Current Modes ... Saving. Check or uncheck "Use UNIX convention (LF) for end-of-line" as necessary and then click the "Apply Now" button.

If I remember correctly, your records will then be displayed correctly and you can then do a File ... Save to preserve the new format.

I apologize in advance if I am leading you astray.
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 Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts Removing the MODETAB field in a VTAM ... rcwing All Other Mainframe Topics 1 Fri Feb 19, 2016 7:11 pm
No new posts Add Trailing Zeroes depending upon th... Rohit Umarjikar DFSORT/ICETOOL 3 Fri Oct 23, 2015 1:47 am
No new posts Removing Leading Spaces and Removing ... rahulpala COBOL Programming 4 Fri Sep 04, 2015 4:58 am
No new posts Benefits of removing DISPLAY statements mkk157 COBOL Programming 17 Thu Aug 13, 2015 12:38 pm


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