On Wed, Aug 22, 2012 at 11:33 AM, Roger Bilau <s...@bilau.de> wrote:

> Hi,****
>
> I currently test a file input routine:****
>
> trace I****
>
> Path = "scm.in_i"****
>
> file1=.stream~new(path)                                           /*
> Create a stream object for the file */****
>
> say rc****
>
> ec=file1~open("read")****
>
> say ec errortext(2)****
>
> do while file1~lines<>0****
>
>                                in = file1~linein
>                                          /* Write a line to the file */***
> *
>
>                                say in****
>
> end****
>
> file1~close****
>
> exit****
>
> Because I want to handle the situation if the input file is not available
> I changed the name of the input file to something****
>
> that didn’t exist and got the message after file1~open(“read”) ‘ERROR:2’**
> **
>
> ** **
>
> But ERROR:2 is nowhere described - in the reference guide I couldn’t found
> it  and errortext(2) didn’t know it.
>
2 is the return code given back from the system when the file was opened.
 This is not a Rexx error number, so errortext() will not return anything
useful for you.  For many standard errors, you can find out what it means
using the description method.  Try "say file1~description".  It will
display:

ERROR:2 No such file or directory

Rick



> ****
>
> Regards****
>
> Roger****
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Oorexx-users mailing list
> Oorexx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-users
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to