I then use the following command: put /ifsreports/jeff/corbtch.xls and get the following error:
No such path or directory: /ifsreports/jeff/corbtch.xls.
When I check the IFS using the WRKLNK command, the file is in the directory.

You have unprintable characters (most likely trailing spaces) at the end of the filename in the IFS. When you use WRKLNK to see what's in the directory, you see the filename, because the unprintable characters don't show on the screen, you don't see them.

When you use the PUT command to send the file, it can't find it because you didn't supply those trailing spaces.

Change your RPG program to trim the spaces off of the filename when you create it. In other words, don't do:

           x = open(myvar: flags: mode)

but instead, do:

           x = open(%trimr(myvar): flags: mode)

Unless you're using a VARYING variable, you must put the %trimr() on the open() call itself. If you do it elsewhere in the calcs, the spaces will be added back on by RPG, since fixed-length fields are just that -- fixed length. SOMETHING has to occupy the rest of the field.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.