FTP with trailing spaces

JES2/3, JCL, utilities.

Topic author
Registered Member
Posts: 44
Joined: Mon May 26, 2014 2:57 pm

FTP with trailing spaces

Postby Anithab » Tue Dec 15, 2015 12:48 pm


I have a file of length 200 and having last 50 bytes filled with space and I wanted to retain the space when I FTP it.

Is there a command to achieve this?

I tried TRAIL in LOCSITE and it did not yield me the expected result as the file was truncated.

How to resolve this, any suggestion will help

User avatar

Anuj Dhawan
Posts: 2393
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Has thanked: 152 times
Been thanked: 66 times

Re: FTP with trailing spaces

Postby Anuj Dhawan » Tue Dec 15, 2015 2:42 pm

I might be mistaken in the reply as I am replying from memory and readings:

If you are talking about IBM zSeries mainframe - check for TRAILINGBLANKS option of FTP from your support. It can be tuned to keep or discard the trailing blanks from records.

If you are talking about iSeries the System i® system trims trailing blanks by default. To turn this off when the iSeries® is the client, issue the LOCSITE TRIM 0 command. It should return a "LOCSITE TRIM option set to 0".


Global Moderator
Global Moderator
Posts: 603
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars
Has thanked: 7 times
Been thanked: 7 times

Re: FTP with trailing spaces

Postby zprogrammer » Tue Dec 15, 2015 3:03 pm

Anuj If I remember correctly TRAIL is shortform for TRAILINGBLANKS in Mainframe and TS had done that I guess

TRAILingblanks Specifies that the FTP server preserves the trailing blanks in a fixed format data set when the data is sent to a foreign host.


Return to “JCL - Job Control Language.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest