Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
REXX Stream I/O

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Ricardo Viegas

New User

Joined: 18 Oct 2012
Posts: 39
Location: Brasil

PostPosted: Tue Aug 05, 2014 7:42 am    Post subject: REXX Stream I/O
Reply with quote

Hi there!

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:
/* 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:
Package level: REXXSIO 130 FIX0000 20020201
SysDSN: OK                                 
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<
Back to top
View user's profile Send private message

Ricardo Viegas

New User

Joined: 18 Oct 2012
Posts: 39
Location: Brasil

PostPosted: Thu Aug 07, 2014 10:03 pm    Post subject: Reply to: REXX Stream I/O
Reply with quote


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
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX script to beautify XML jzhardy CLIST & REXX 1 Sun Oct 11, 2020 1:23 pm
No new posts TWS PIF (EQQYCOM) Rexx - Occurrence S... Richard Baker IBM Tools 0 Wed Sep 16, 2020 10:45 am
No new posts Call Natural program with rexx shahaf CLIST & REXX 2 Tue Sep 08, 2020 11:22 am
No new posts CA Sysview - JCL or Rexx - Read or Ex... Jasi CA Products 4 Wed Aug 05, 2020 9:19 pm
This topic is locked: you cannot edit posts or make replies. Invoke REXX thru JCL to expand the co... spizen556 CLIST & REXX 2 Sun Jul 26, 2020 3:53 pm

Back to Top
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us