有关我如何阅读要在rexx面板中显示的文件内容的建议,请您提供手册或示例代码。 文件中的行数可能会有所不同,因此无法使用静态方式。
感谢, 塞缪尔马修斯。
答案 0 :(得分:3)
在ZOS中读取rexx中的文件时,请使用execio命令 即。
"EXECIO * DISKR myindd (STEM fileContentsVar."
将文件读入一个干变量(fileContentsVar.0保存记录数和 fileContentsVar.1 ...保存实际数据。)
您可以将文件内容存储在ISPF table中,并使用以下内容显示表格 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 *
************************************************************