This is a variation on a theme, but to add on to Scott's possibilities:
In a filesystem where case matters, it is possible that you have two files
with the same name - but the name cases don't match. This can cause
to do some strange things, like showing you only one of the files when
are clearly two.
If your intended file is /path/to/file/filename.csv, then on your IBM i, do
ls -l /path/to/file' | grep -i '*filename.csv*'
This may reveal something to you.
"Tact is the ability to describe others as they see themselves."
-- Abraham Lincoln
Yes, the IFS e-book on my web site was written for v4r5... The
O_TEXT_DATA feature (and it's corresponding 5th parameter) was added
to the OS in V5R2. You can get the current copy of IFSIO_H here:
It's still unclear to me what the actual cause of the problem is...
Here's how I'd call the open() API... maybe that'll help.
IFS_File_Name = '/excel/xml/I12456_0.csv';
FileDs = open( %trimr(IFS_File_Name)
: O_CREAT + O_WRONLY + O_TEXTDATA + O_CCSID
+ O_TEXT_CREAT + O_INHERITMODE
: 0 );
The fact that the file shows up on IBM i, but not on Windows is not a
commonplace error. It implies (as I said before) that there are two
copies of the file.
1) That there are two locations, and you're viewing different
locations from each source.
2) That you didn't trim the trailing blanks from the filename, and so
you have two copies, one with blanks in the filename, and one without.
On 6/18/2012 2:07 PM, Jeff Young wrote:
1. The proper number of bytes for the file is 100. This shows in
the WRKLNK option 8 on the i. The file consists of 2 records each
2. In Windows (XP Pro) when I view the list of files on the mapped
it shows 1K.does
When I double click on the file name, nothing happens. The file
not open and no error is issued.an
3. When viewing the properties in Windows, the file shows as 0 bytes.
I am using the IFSIO_H copy book from your book, although it may be
older copy as I had to modify the Open prototype to add the fifthparm
required for O_TEXT_CREAT.--
The code I use for the Open of the file is shown in my original post.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives