× 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.



Antonio,

Let me address your second issue first.  If you want the information written to 
the stream file to appear or be read in a record format as opposed to a 
continuous stream you will need to add the CRLF characters to your output at 
the end of each record.

On locating the file for read, try leaving the path out and just passing the 
file name.  From my experience each user has a default directory where files 
are written to and read from.  It sounds like you might by telling the API to 
look for a directory named '/etc' in the default directory which is also named 
'/etc'. 

Rick

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of afvaiv
Sent: Sunday, June 06, 2004 4:13 PM
To: Midrange Systems Technical Discussion
Subject: Problem accessing IFS with APIS


Folks,
I have 2 problems somehow related:

Problem1:
I've been implementing a program to access IFS files following two 
sample programs writen by Julian Monypenny in the Spanish version of 
News400 magazine recently.
One of them, a simplified version of  a CPYF-like program, I cannot make 
it work.
Let's take, e.g., directory   /etc  , which has a file in it, named 
"magic" of type STMF .

To read a file I pass its full name, which I've ckecked and gets 
correctly to the program, eg     /etc/magic  
The handle = openStreamFile (...) is rejected (-1), and I've checked the 
ERRNO is 3025 which means "no such file or library"
Also tried with other files, with same result.

Am I supposed to pass the file name as      /etc/magic.stmf      or 
something like it, i.e. with some extension? Tried different 
combinations to no help.

I've writen another program, just to write a file of my own, just to 
test the previous one, and wrote a new file as  
    /etc/Prueba         (no extension, "P" uppercase, just in case it 
matters...)

After execution, it shows up in    wrklnk  '/etc'
So, I go back to first program, and try to read it from   /etc/Prueba   
  and again get same 3025  error.

Any clues or suggestions?

Problem2:
By the way, the file /etc/Prueba   I wrote was made up of 5 consecutive 
writes with  " putStreamFile " of a fixed text of all 26 capital letters 
of the alphabet. When I did the    wrklnk  '/etc'   and got to Prueba, 
did a display (5)  and what I got was the 130 letters in a row... all in 
one single string.

What I want to end up reading will be some text files passed from a PC 
application, which I assume will be in some "plain text" format, may be 
as    "xxx . txt" or the like, so I expect it to have different lines 
with CR+LF at end of each record.

If, in the end, I manage to read that file (assuming I get Problem1 
first solved...), reading it with   "getStreamFile" will  read it as a 
hugh buffer (of the size I give) or will I get it one record at the time???

TIA

-- 
Antonio Fernandez-Vicenti
afvaiv@xxxxxxxxxx


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.