×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

This can be done by a REXX. The followings is a example: CAPTURE 'TSO COMMAND', it will create a dataset contains output of TSO COMMAND

本文发表在 rolia.net 枫下论坛/* REXX */

MOD = "NO"

PARSE ARG PARM1 CMD

IF TRANSLATE(PARM1) = "MOD" THEN MOD = "YES"
ELSE CMD = PARM1 CMD

OUTFILE = USERID()".CAPTURE"

X = OUTTRAP("DUMMY.")

IF MOD ¬= "YES" THEN "DELETE" OUTFILE
"ALLOC F(OUTFILE) DA("OUTFILE") TRACKS SPACE(10,10) MOD KEEP REUSE"

X = OUTTRAP("OUTLINE.")

CMD

X = OUTTRAP(OFF)

"EXECIO" OUTLINE.0 "DISKW OUTFILE (OPEN FINIS STEM OUTLINE."

"FREE F(OUTFILE)"

"ISPEXEC VIEW DATASET("OUTFILE")"更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / 学科技术讨论 / Help needed: How to save the output from TSO Command line to a txt file or some other format that I can download and read it later on?
    Right now the answer I got is

    "Unless there is an OUTPUT parameter in the command you are executing, the answer is “you can’t”. You can print screen and save it manually or if there is a batch interface you could write it out to an output dd. But as far as I know there is not inherent way to save command line output to a .txt file"

    Any inputs are much appreciated!
    • This can be done by a REXX. The followings is a example: CAPTURE 'TSO COMMAND', it will create a dataset contains output of TSO COMMAND
      本文发表在 rolia.net 枫下论坛/* REXX */

      MOD = "NO"

      PARSE ARG PARM1 CMD

      IF TRANSLATE(PARM1) = "MOD" THEN MOD = "YES"
      ELSE CMD = PARM1 CMD

      OUTFILE = USERID()".CAPTURE"

      X = OUTTRAP("DUMMY.")

      IF MOD ¬= "YES" THEN "DELETE" OUTFILE
      "ALLOC F(OUTFILE) DA("OUTFILE") TRACKS SPACE(10,10) MOD KEEP REUSE"

      X = OUTTRAP("OUTLINE.")

      CMD

      X = OUTTRAP(OFF)

      "EXECIO" OUTLINE.0 "DISKW OUTFILE (OPEN FINIS STEM OUTLINE."

      "FREE F(OUTFILE)"

      "ISPEXEC VIEW DATASET("OUTFILE")"更多精彩文章及讨论,请光临枫下论坛 rolia.net
      • 谢了兄弟! 刚看到回帖