Does DSN ... TEST(0) write to DSNTRACE any more info than one would
running same code under non-TSO batch via Call Attach Facility
//DSNTRACE DD SYSOUT=....
Thanks! - Jim
Ran Abeykoon wrote:
> As others suggested you can capture the output of DB2 commands
into a data set
> using the REXX OUTTRAP command. However it's a longer way of
> desired result.
> The best and the cleanest way to capture the output is by
allocating a data set
> to a file called DSNTRACE which DB2 uses to write the results
of DB2 commands.
> But remember to use the TEST(0) option when connecting to the
DB2 sub system to
> guarantee the output is written to DSNTRACE file. I've used
this technique and
> developed extremely useful utilities for a number of
organisations to train
> inexperienced DB2 personnel. The basic coding is as
> ACCESS_DB2 :
> "FREE F(DSNTRACE)"
> IF SYSDSN(USERID().DSNTRACE) ¬= 'OK' THEN
> "ALLOC F(DSNTRACE) DA("USERID()".DSNTRACE) " ,
> "UNIT(SYSDA) RECFM(F B) LRECL(0) BLKSIZE(13300) " ,
> "SPACE(1,1) CYLINDER NEW REU"
> "ALLOC F(DSNTRACE) DA("USERID()".DSNTRACE) SHR REU"
> QUEUE '-DIS DB(XYZ) SPACE(*) LIMIT(*)'
> QUEUE 'END'
> QUEUE ''
> "DSN SYSTEM("SSID") TEST(0)"
> CONRC = RC
> "ISPEXEC BROWSE DATASET("USERID()".DSNTRACE)"
> If you need any further details, please contact me
> Ran Abeykoon
> Technical Consultant/AMPLUS
> Date: Wed, 6 Oct 1999 15:06:57 -0400
> From: Lentine Chuck O <[login to unmask email]>
> Subject: Output from the TSO DSN Command
> I would like to write a CLIST or a REXX command to issue the
> DATABASE(XYZ) LIMIT(*) command and have the output written to
a file instead
> of displayed on the screen. If I run the command in batch the
> to the SYSTSPRT file. So I tried allocating that file to a
dataset but the
> data still displayed on the screen. So I tried allocating
> SYSTERM to files but the data still displayed on the screen.
> successfully captured the command output from a DSN command in
> If so, how did you do it?
777 Passaic Avenue
Clifton, NJ 07012
Tel: (973) 249-9410 Ext. 231
Fax: (973) 249-9257
May those who love us, love us
And those that don't love us,
May God turn their hearts.
And if he doesn't turn their hearts,
May he turn their ankles
So we'll know them by their limping.
- - - Old Gaelic Blessing