× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



So we can assume if you use option 5, you can see the data?



----- Original Message -----
From: Jeff Young <jyoung0950@xxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Cc:
Sent: Monday, June 18, 2012 2:07 PM
Subject: Re: Help creating file on IFS

Scott,
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 50 bytes.

2. In Windows (XP Pro) when I view the list of files on the mapped drive,
it shows 1K.
  When I double click on the file name, nothing happens.  The file does
not open and no error is issued.

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 an
older copy as I had to modify the Open prototype to add the fifth parm
required for O_TEXT_CREAT.

The code I use for the Open of the file is shown in my original post.

Thanks,

Thanks,

On Mon, Jun 18, 2012 at 2:35 PM, DeLong, Eric <EDeLong@xxxxxxxxxxxxxxx>wrote:

Does IFS_File_Name need to be varying length, so you don't pass up blanks
as part of the file name?

-Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jeff Young
  Sent: Monday, June 18, 2012 8:21 AM
To: RPG400-l@xxxxxxxxxxxx
Subject: Help creating file on IFS

All,
I have a program that is attempting to create a file on the IFS.
I am using the IFSIO_H copybook from Scotts IFS book for the prototypes.
The snippet of code below is failing on the open.
<snip>

D IFS_File_Name S 50A

D FileDs S 10I 0

D RC S 10I 0

D Bytes_Loaded S 10I 0

D Msg S 256A Based(p_Msg)

D Test_Data S 1350A

D

// Prototypes for IFS Processing

/Copy QCopyBks,IFSIO_H

/copy QCopyBks,ERRNO_H

/Free

Test_Data = '123456179 THIS IS A TEST ITEM,213123434 THIS IS ANOTHER';

// Create file on IFS

IFS_File_Name = '/excel/xml/I' +

'12456' +

'_' +

'0' +

'.csv';

FileDs = Open(IFS_File_Name // Path & File Nmae

: O_CREAT + // Create File

O_WRONLY + // Write Only

O_CCSID + // Use Code Page

O_TEXTDATA + // Text Data

O_TEXT_CREAT // Create File

: S_IRWXU // Owner has ALL Auth

: 1252 // PC Code Page

);

  p_ErrNo = sys_errno;

p_Msg = strerror (errno);
</snip>
The value received for the error message text is

--
Jeff Young
Sr. Programmer Analyst
--
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,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
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,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





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.