> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[email protected]] On Behalf Of Howard Brazee
> Sent: Tuesday, May 18, 2010 1:40 PM
> To: [email protected]
> Subject: Creating a variable length FTP to ASCII file
> 
> I have a job that creates a LRECL=7104 record.    Most of this a
> variable length comment.    It gets FTPd to a Unix machine and loaded
> into a database.    They want the extra spaces removed.

Trailing blanks or embedded blanks?

quote site notrailingblanks

on the ftp to remove trailing blanks, for a UNIX client (ftp initiated by UNIX).

locsite notrailingblanks

for a z/OS client (ftp initiated by z/OS).

> 
> I doubt if the optimal solution would be to make it variable length,
> and wonder if I should create a delimiter then run it through some
> kind of script on the Unix side.
> 
> Any other recommendations?

Simple UNIX code to delete trailing blanks:

sed 's/ +$//' <input.file >no.trailing.blanks

Simple UNIX command to compress multiple blanks to a single blank:

tr -s ' ' <input.file >squeezed.out.extra.blanks


--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to