I have just installed the "REXX Stream I/O" function package and I would appreciate if somebody could clarify some points related to it (I went through the REXX/CLIST forum and found some postings from Enrico Sorichetti and others about the subject, but was unable to find answers to the following specific questions)
1) I found 3 sources of documentation:
a) Manual "z/OS Stream I/O for TSO/E REXX - Version 1" (no code), dated February/2002
b) Manual "IBM Compiler and Library for REXX on System z - User's Guide and Reference, code SH19-8160-06, dated August/2013
c) Web site "http://www-01.ibm.com/support/docview.wss?uid=swg1PK02493", with corrections to the SH19-8160-05 manual, but all of them applicable to the new edition.
Are there a more actual/coherent/error_free documentation?
2) The package level installed is "130 FIX0000 20020201". Are there a more recent one? If so, where could I find it in the Web?
3) When the option "QUERY EXISTS" is used in the "Stream" function, with the "stream ddname", as far as I understood, the function should return the fully qualified name of the dataset, but I get a null value (please, see the attached output)
4) As mentioned in the documentation, there should occur a return of "-ERROR" when the dataset defined for the "Stream" function, with the "OPEN" option, does not exist, but it returns "ERROR" (please, see the attached output).
5) Related to the two previous questions, am I missing something?
Thanks in advance!
Regards, Ricardo
-----------------------------------
The test exec:
Code:
/* REXX Stream I/O */
Say 'Package level:' Stream(,'COMMAND', 'QUERY SERVICELEVEL')
Say; Say 'SysDSN:' SysDSN('TEST.REXX.STREAMIO(TEST)')
Say 'Query DataSet: >' || ,
Stream("'TEST.REXX.STREAMIO'", 'C', 'QUERY EXISTS')'<'
Say 'Query DataSet/Member: >' || ,
Stream("'TEST.REXX.STREAMIO(TEST)'", 'C', 'QUERY EXISTS')'<'
strm = Stream("'TEST.REXX.STREAMIO(TEST)'", 'C', 'OPEN')
Say "Stream's DDName: >"strm'<'
Say 'Query stream: >'Stream(strm, 'C', 'QUERY EXISTS')'<'
Do ctr = 1 While Lines(strm)
line = LineIn(strm, , '1')
Say 'Line' ctr 'with length' Length(line)': >'Strip(line)'<'
End ctr
Say; Say 'SysDSN:' SysDSN('XPTO')
Say 'Query DataSet = >'Stream("'XPTO'", 'C', 'QUERY EXISTS')'<'
Say "Stream's DDName: >"Stream("'XPTO'", 'C', 'OPEN')'<'
Return 00
And its output:
Code:
Package level: REXXSIO 130 FIX0000 20020201
SysDSN: OK
Query DataSet: >TEST.REXX.STREAMIO<
Query DataSet/Member: >TEST.REXX.STREAMIO(TEST)<
Stream's DDName: >&SYS00341<
Query stream: ><
Line 1 with length 80: >just for testing - line 1<
Line 2 with length 80: >just for testing - line 2 (last line)<
SysDSN: DATASET NOT FOUND
Query DataSet = ><
EAGSIO0033 Cannot allocate data set. Data set name not found.
Stream's DDName: >ERROR<
I would like to add a few observations related to my previous post. I am doing so because, probably, many of the z/OS-REXX users (as myself, until a few days ago) never heard about the "REXX Stream I/O" function package.
1) This package implements, for the z/OS-REXX, the functions CHARIN, CHAROUT, CHARS, LINEIN, LINEOUT, LINES and STREAM, very similar to the existing ones in the REXX implementations in many other operating systems (for example ooREXX in Windows), that do not use EXECIO.
2) In spite of being described in the REXX Compiler manual, those functions are available, in z/OS, for both compiled AND interpreted REXX execs. So, you do not need to have the Compiler installed in your system to make use of them.
3) If you intend to install it:
a) get the file "rexxsio.zip" at "ftp://service.boulder.ibm.com/ps/products/ad/obj-xx".
b) for the installation instructions, utilize the SH19-8160-06 manual, with the corrections pointed in the Web site "http://www-01.ibm.com/support/docview.wss?uid=swg1PK02493"
Hope this be of some help (and clarification)!.
Rgrds, Ricardo