Title: rexx reading file data onto panel
Tags: panel;rexx
Question: can you please suggest me the manual or example codes on how i can read the content of a file to be displayed in a rexx panel.
the number of lines from the file can vary and so cannot use the static manner.

thanks,
Samuel Mathews.

Comment: should we assume you are working on z/OS?


Here is another answer: In ZOS to read the file in rexx use the execio command
i.e.

```"EXECIO  *  DISKR  myindd  (STEM fileContentsVar."
```

Reads the file into a stem variable (fileContentsVar.0 holds the number of records and
fileContentsVar.1 ... hold the actual data).

You could store the file contents in a ISPF table and display the table using the
TBDispl command

The rexx code will be roughly

```address ispexec
'tbcreate myfile names(line)'

do i=1 to fileContentsVar.0
   line = fileContentsVar.i
   'tbadd myfile'
end
'tbtop myfile'
'tbdispl mypanel'
'tbend myfile'
```

For an example of a table-panel definition see http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.f54dg00%2Fispzdg8040.htm

A table-panel would look like:

```************************************************************
* )Attr                                                    *
*   @ Type(output) Intens(low) Just(asis)   Caps(off)      *
* )Body                                                    *
* -------------------- ????????????????? ----------------- *
* +Command ==&gt;Cmdfld                    +Scroll ==&gt;_samt+  *   
* +                                                        *    
* This table shows  ...                                    *    
*                                                          *   
* Line                                                     * 
* )Model                                                   *   ---- The model setion holds the
* @line                           +                        *        Table display section
*                                                          *
* )Init                                                    *
*   &amp;samt=page                                             *
* )Proc                                                    *
* )End                                                     *
************************************************************
```

Comment for this answer: thanks, i wil chk and let you know the updates... yes, am workin in ZOS

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2014:00:04/29/14', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<panel><rexx>', 'Title': 'rexx reading file data onto panel', 'ViewCount': 1968, 'id': 23358024, 'user_AboutMe': None, 'user_AccountId': 2593683.0, 'user_DisplayName': 'Samuel Mathews', 'user_Reputation': 171.0, 'user_Views': 54.0, 'user_id': 2247784.0}}