Page 1 of 2

About IND$FILE GET and text files

PostPosted: Mon Jan 19, 2009 10:12 pm
by makoki
Hi all,

I'm new to this forum and also new on IBM Mainframe programming.

Recently I've wrote a program that generate a text files. This text files contains a several spaces on the right of each record. When I download those text files into my computer, these spaces disappears. I have to include a character (a '#') to the end of each record to get the record length that I need.

Unfortunately, this is not the best way to do what I need, because I need to run other application to extract this additional character. It would be nice if there's any way to get the file like I want without to have to include this # character.

Any suggestions?

Thank's in advice and regards,

Ferran.

PS. Sorry about my English. I know, is not enough good.

Re: About IND$FILE GET and text files

PostPosted: Mon Jan 19, 2009 10:31 pm
by dick scherrer
Hello and welcome to the forum,

Sorry about my English. I know, is not enough good.
Opinions vary. I believe your English is quite well done.

Many file transfers are set up to remove trailing blanks to reduce transmission time.

Suggest you try ftp to download the file rather than ind$file. If you intend to use ind$file, suggest you talk with the system support people to learn if something in your configuration can be changed to preserve the trailing blanks.

Re: About IND$FILE GET and text files

PostPosted: Mon Jan 19, 2009 11:33 pm
by makoki
Thank's for you reply, Dick.

I'm not sure, but I think that ftp is disabled by the System Administrators. I'm going to ask him about that tomorrow, perhaps there's a way to enable ftp for this porpouse. If not, I will try to find more information about ind$file.....

If I find something, I will post it here.

Thank's again,

Ferran.

Re: About IND$FILE GET and text files

PostPosted: Tue Jan 20, 2009 6:40 am
by dick scherrer
Hi Ferran,

I think that ftp is disabled by the System Administrators.
Most often a desktop is not set up as an ftp server, but almost all pcs have an ftp client. Usually someone uses their mainframe id to use mainframe-based ftp.

Are you issuing ind$file from a tso command prompt? What options are specified? I seem to remember a -f that was to do deal with trailing blanks/space, but it has been a long time. . .

Good luck,

d

Re: About IND$FILE GET and text files

PostPosted: Tue Jan 20, 2009 1:34 pm
by makoki
Hi Dick,

I'm using ind$file from IBM Workstation program itselt, not writting the command directly on the emulator. The options that are sent to the HOST are ACSCII CRLF. Seems that CRLF option deletes trailing spaces and inserts carriage return/line feed characters when a file is stored on the PC. Well, this is not good for me, I need both (CRLF and trailing spaces).

I have tried this on the ISPF TSO or Workstation command:
IND$FILE GET 'C988.FIX.C4445.P0060001' ASCII CRLF -f
.

But gives me a "INVALID KEYWORD -f" error.....

Thank's again Dick,

Ferran

Re: About IND$FILE GET and text files

PostPosted: Tue Jan 20, 2009 7:51 pm
by Bill Dennis
Find where the Tranfer Type is defined and add the Additional Option NOTRUNC to prevent this.

In IBM PCOM, it's under toolbar Edit...Preferences...Transfer...MVS/TSO and modify TEXT or use it as a model for a new TEXT80 type.

Re: About IND$FILE GET and text files

PostPosted: Wed Jan 21, 2009 1:54 pm
by makoki
Hi Bill,

I don't see NOTRUNC option into the Text transfer type. I have ASCII, CRLF and Append options, but there is not a NOTRUNC option into MVS/TSO section of these preferences.

Perhaps it's a matter of the IBM PCOM application version. I have installed the 5.7 version. ¿There's a higher version that includes that option?

Thank's

Ferran.

Re: About IND$FILE GET and text files

PostPosted: Wed Jan 21, 2009 10:04 pm
by Bill Dennis
You must add it yourself in the Additional Options area for the Transfer Type that you use. Then click on SAVE to save the changes.

Re: About IND$FILE GET and text files

PostPosted: Thu Jan 22, 2009 1:50 pm
by makoki
Great Bill!

Now It works as I want!!!!!

Thank's again and regards,

Ferran.

Re: About IND$FILE GET and text files

PostPosted: Wed Feb 17, 2010 2:35 pm
by DRIQU
Hy

thank you for your help
the option notrunc is wonderful

Driqu (i'am french , sorry for my english)