您能否向我推荐有关如何读取要在 rexx 面板中显示的文件内容的手册或示例代码。文件中的行数可以变化,因此不能使用静态方式。
谢谢,塞缪尔·马修斯。
在 ZOS 中读取 rexx 中的文件使用execio命令,即
"EXECIO * DISKR myindd (STEM fileContentsVar."
将文件读入一个 stem 变量(fileContentsVar.0 保存记录数,fileContentsVar.1 ... 保存实际数据)。
您可以将文件内容存储在ISPF 表中并使用TBDispl命令显示该表
rexx 代码大致如下
address ispexec
'tbcreate myfile names(line)'
do i=1 to fileContentsVar.0
line = fileContentsVar.i
'tbadd myfile'
end
'tbtop myfile'
'tbdispl mypanel'
'tbend myfile'
有关表面板定义的示例,请参见http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.f54dg00%2Fispzdg8040.htm
一个表格面板看起来像:
************************************************************
* )Attr *
* @ Type(output) Intens(low) Just(asis) Caps(off) *
* )Body *
* -------------------- ????????????????? ----------------- *
* +Command ==>Cmdfld +Scroll ==>_samt+ *
* + *
* This table shows ... *
* *
* Line *
* )Model * ---- The model setion holds the
* @line + * Table display section
* *
* )Init *
* &samt=page *
* )Proc *
* )End *
************************************************************