i think there is a command -noprompt that may help here.
I have TSM on OS390 2.7 and the SQL syntax i use is :
//STEP01 EXEC PGM=IKJEFT1B,DYNAMNBR=100,REGION=4M,ACCT=000038
//STEPLIB DD DSN=CEE.SCEERUN,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTCPD DD DSN=TCP.SYSB.TCPPARMS(TCPDATA),DISP=SHR
//DSCOPT DD DSN='options file',DISP=SHR
//DSCLANG DD DSN=ADSM.V3R1M0.SANSMSG(ANSMENU),DISP=SHR
//SYSTSIN DD *
ANSADM -ID=******** -PAS=******** -NOCONFIRM
//SYSIN DD *
SET SQLDISPLAYMODE W
SELECT * -
FROM BACKUPS -
WHERE NODE_NAME ='**********' -
> 'dataset name'
QUIT
/*
this has been working fine without problems.
Thanks,
Kuli Toora
Npower
Enterprise Services
Kingswinford
01384 275346
Mobile : 07989 492903
mailto:[EMAIL PROTECTED]
-----Original Message-----
From: Bruno Calce [mailto:[EMAIL PROTECTED]]
Sent: 13 July 2001 14:50
To: [EMAIL PROTECTED]
Subject: AW: AW: SQL on OS390
I haven't found out yet how to turn off the prompt. I don't know
when this message appears and when it doesn't (one time the same query
runs without getting this message, the other time it gets it).
i really would like to know, what happens inside dsmadmc...
anyway, the prompt loop can be avoided by inserting a line in the
SYSIN after the query statement with the response 'YES'. I did it
once, and the prompt never came back again .....
sorry for not being more accurate, but i also spent too much time
on finding out what should be documented. hope this works!
-----Ursprüngliche Nachricht-----
Von: Zoltan Forray/AC/VCU [mailto:[EMAIL PROTECTED]]
Gesendet am: Freitag, 13. Juli 2001 15:19
An: [EMAIL PROTECTED]
Betreff: Re: AW: SQL on OS390
Well, this is a lot closer to what I am looking for.
It almost worked.
Now it gets stuck in a prompt loop:
ANR2963W This SQL query may produce a very large result table .......
Do you wish to proceed? (Yes/No)
Do you wish to proceed? (Yes/No)
Do you wish to proceed? (Yes/No)
......
Is there a way to turn off the prompts ?
Bruno Calce <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
07/13/2001 08:39 AM
Please respond to "ADSM: Dist Stor Manager"
To: [EMAIL PROTECTED]
cc:
Subject: AW: SQL on OS390
hello,
i guess you have to use QUIT before the "/*".
my job looks like this and it works://S99QBAT JOB NOTIFY=S99Q
//**********************************************************************
//* EXECUTE ADMIN CLIENT IN BATCH *
//**********************************************************************
//SERVER EXEC PGM=DSMADMC,
// PARM='/-ID=BAT -PA=BATUSER1'
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SELECT MSGNO,MESSAGE,DATE_TIME FROM ACTLOG WHERE -
ORIGINATOR='SERVER' AND -
(SEVERITY='E' OR SEVERITY='W' OR MSGNO=9999) -
AND DATE_TIME>='2001-07-01 00:00:00.000000'
QUIT
//DSCOPT DD DISP=SHR,DSN=DSM1.ADMIN.OPTIONS
//DSCLANG DD DISP=SHR,DSN=SYS1.SANSMSG(ANSMENU)
regards
bruno
-----Ursprüngliche Nachricht-----
Von: Zoltan Forray/AC/VCU [mailto:[EMAIL PROTECTED]]
Gesendet am: Freitag, 13. Juli 2001 14:19
An: [EMAIL PROTECTED]
Betreff: Re: SQL on OS390
Thanks for the many answers about using "+". However, it doesn't work.
I guess I didn't make my self clear. I am running ADSM in batch, not
"TSO in BATCH" !!
The only reason the "+" works is because it is TSO in BATCH ! Here is
what I am trying to do:
//STEP1 EXEC PGM=DSMADMC,PARM='-ID=BATCHADM -PASSWORD=BATCHADM'
//STEPLIB DD DSN=TIVOLI.SANRLOAD,DISP=SHR
//DSCLANG DD DSN=TIVOLI.SANSMSG(ANSMENU),DISP=SHR
//DSCOPT DD DSN=TIVOLI.BATCH.OPTIONS(DSMOPT),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
select volume_name,stgpool_name,pct_utilized from volumes where
pct_utilized<40 order by pct_utilized > forray.volutil
/*
I have tried "-", "+" and even "/" as was suggested by a co-worker ! Still
nothing. I get:
adsm> ANR2907E Unexpected SQL operator token - '/'.
|
..............................................................V
lect volume_name,stgpool_name,pct_utilized from volumes where /
ANS8001I Return code 3.
Note, this works for almost everything else TSM allows as a command.
Luuk Kleibrink <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
07/13/2001 02:46 AM
Please respond to "ADSM: Dist Stor Manager"
To: [EMAIL PROTECTED]
cc:
Subject: Re: SQL on OS390
Zoltan,
This works (NOTE: don't put spaces around the comma's, this might be your
problem):
//TSO1 EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=X
//SYSTSPRT DD SYSOUT=X
//SYSTERM DD SYSOUT=X
//SYSOUT DD SYSOUT=X
//SYSTCPD DD DSN=SYS1.TCPPARMS(TCPDATA),DISP=SHR
//DSCOPT DD DSN=SYP.TSM.TSOADMIN.OPTIONS,DISP=SHR
//DSCLANG DD DSN=SYS2.TSM.SANSMSG(ANSMENU),DISP=SHR
//SYSTSIN DD *
DSMADMC -ID=id -PA=password -OUT='OS390 data set name' +
SELECT STGPOOL_NAME,SUM(NUM_FILES) AS FILES, +
SUM(LOGICAL_MB) AS MB,NODE_NAME FROM OCCUPANCY +
GROUP BY STGPOOL_NAME,NODE_NAME ORDER BY NODE_NAME,STGPOOL_NAME
Luuk Kleibrink
Delta Lloyd Nuts Ohra
===============================================================
This incoming e-mail (and any attachments) has been checked at
npower, and has been found to be clean from any
virus infection (using Sophos Sweep 3.47 + patches).
npower Service Desk
(internal telephone 187, external 01384 275454,
or e-mail npower Postmasters [internally]
or [EMAIL PROTECTED] [externally])
===============================================================
====================================================================This email and any
files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
gpupower.co.uk or [EMAIL PROTECTED]
This outgoing e-mail (and any attachments) has been checked
(using Sophos Sweep 3.47 + patches) before leaving us (UK 08457 353637),
and has been found to be clean from any virus infection.
====================================================================