I am cleaning it up with a SAS job that is also putting a data set together that I use for e-mail notification. I just hate having to add the extra code to this on this job and ever other job down the road. I figured that there was a way to have the output come out clean and it was about time that I learned it. I am glad that you were able to help me get it into a reasonable format. I am going to a local user group meeting next week. I am going to bring this issue up at the meeting. If I find a way to get it done I will forward the solution to you. Thanks for your help. Matt
-----Original Message----- From: Ike Hunley [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 5:44 AM To: [EMAIL PROTECTED] Subject: Re: NEED HELP CONTROLLING SCRIPT OUTPUT, FIELD LENGTHS Matt, I have not found a way to get my data on one line either. I input the data into REXX code to reformat it the way I want. What would you like your output to look like? I could send you a REXX exec. -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED]]On Behalf Of MC Matt Cooper (2838) Sent: Wednesday, March 27, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Re: NEED HELP CONTROLLING SCRIPT OUTPUT, FIELD LENGTHS I have tried everyone's suggestions. I believe the fact that I have one AS statement in the script that it will ignore the attempts of fixing the output into a 1 line per node output. The -COMMAdelimited , -TABdelimited, -OUT didn't work. I was able to get a 1 line output, with a title line and some other 'extra' lines of TSM header and msgs. The only way I seem to have in controlling this is with the suggestion from Paul, using an AS " big area " . This whole 'programming' area seems to go by a lot of undocumented rules. Why don't they document them somewhere? Or give a direct reference to which other product doc to look at? I am able to directly control the length of a numeric output with 'decimal(xx)' statement. What about character output? I am still disappointed that I can not seem to get an output that would be nothing more than what I really want 12 character node name delimiter 4 digit number of days since last access delimiter contact field name of 20 characters, then the next line .... . The best I came up with is as follows. SCRIPT... select node_name as "NODE", - cast((current_timestamp-lastacc_time)days as decimal(4)) as "DAYS", - contact as " CONTACT " from nodes where - cast((current_timestamp-lastacc_time)days as decimal) >= 7 OUTPUT FILE ..... ADSTAR Distributed Storage Manager Command Line Administrative Interface - Version 3, Release 1, Level 0.7 (C) Copyright IBM Corporation, 1990, 1999, All Rights Reserved. ANS8000I Server command: 'select node_name as "NODE", cast((current_timestamp- NODE DAYS CONTACT ------------------ ------ -------------------------------- AG570 58 Elliott/desktop DEFIANT 12 R.Schulte, D.Harrison DSS1OLD 343 Connie Brooks WIN2KAD 34 Karlene Michael ANS8000I Server command: 'COMMIT' ANS8002I Highest return code was 0. -----Original Message----- From: Seay, Paul [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 11:13 AM To: [EMAIL PROTECTED] Subject: Re: NEED HELP CONTROLLING SCRIPT OUTPUT, FIELD LENGTHS That will help, but you can also do the AS "[ lots of spaces ]" to lengthen the output field. What we really need is a set displaymode=fixedraw. This is an example of something that I do: select stgpool_name as "Storage Pool Name ", cast(sum(est_capacity_MB*pct_utilized/100/1024) as decimal(7,3)) as "Total GB in Pool", cast(avg(est_capacity_MB*pct_utilized/100/1024) as decimal(7,3)) as "AVG GB / Tape", cast(count(volume_name) as decimal(4,0)) as "Tapes " from volumes where stgpool_name like 'CPY%' or stgpool_name like 'TAPE%' group by stgpool_name Notice that he stgpool_name field is lenghtened to prevent the wrap by adding the spaces. -----Original Message----- From: Rejean Larivee/Quebec/IBM [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 10:46 AM To: [EMAIL PROTECTED] Subject: Re: NEED HELP CONTROLLING SCRIPT OUTPUT, FIELD LENGTHS Hello Matt, remove the -TAB and use -DISPLAY=LIST instead. I believe this is what you are looking for. ----------------------------------------------------------------- Rejean Larivee IBM TSM/ADSM Level 2 Support "MC Matt Cooper (2838)" To: [EMAIL PROTECTED] <Matt.Cooper@AMGRE cc: ETINGS.COM> Subject: Re: NEED HELP CONTROLLING SCRIPT OUTPUT, FIELD LENGTHS Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED] EDU> 03/27/2002 11:00 AM Please respond to "ADSM: Dist Stor Manager" Ike, I am running the following batch job. I added the -TAB and tried -OUTFILE with a redirect in the macro to the data set and that didn't work either. So I tried a few different variation of the above and even went back to adding a / after the ADSMC as the book says. None of it made a difference. It always came back with the output looking the same. Ideally I would want just the needed fields, with fixed length 1 per line. Matt THE JOB..... //TSMJOB1 EXEC PGM=IKJEFT01 //STEPLIB DD DSN=SYS1.CEE.SCEERUN, // DISP=SHR //DSCLANG DD DSN=SYS1.TSM.SANSMSG(ANSMENU),DISP=SHR //DSCOPT DD DSN=AGPP.TSM.TSOADMIN.OPTIONS,DISP=SHR //SYSHELP DD DSN=SYS1.TCPIP.SEZAHELP,DISP=SHR //SYSIN DD DUMMY //D1 DD DSN=AGPP.TSM.INACTIVE.NODES,DISP=SHR //SYSTSIN DD * DSMADMC -ID=ADMINJOB -PASSWORD=xxxxxxxx -OUTFILE=DD:D1 MACRO DD:D2 -TAB //D2 DD * select node_name,lastacc_time,contact from nodes where - cast((current_timestamp-lastacc_time)days as - decimal) >= 7 /* //SYSTSPRT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* THE OUTPUT FILE .... ADSTAR Distributed Storage Manager Command Line Administrative Interface - Version 3, Release 1, Level 0.7 (C) Copyright IBM Corporation, 1990, 1999, All Rights Reserved. ANS8000I Server command: 'select node_name,lastacc_time,contact from nodes where NODE_NAME LASTACC_TIME CONTACT ------------------ ------------------ ------------------ DTE-1710 2002-03-15 Dan 09:28:26.000000 Harrison/Desktop DTE-1720 2002-03-15 SUE 23:27:49.000000 NEBINGER/DESKTOP -----Original Message----- From: Hunley, Ike [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 8:21 AM To: [EMAIL PROTECTED] Subject: Re: NEED HELP CONTROLLING SCRIPT OUTPUT, FIELD LENGTHS Matt, What do you do to execute the select command in the z/OS environment? -----Original Message----- From: MC Matt Cooper (2838) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: NEED HELP CONTROLLING SCRIPT OUTPUT, FIELD LENGTHS Hello all, I am trying to write a simple script that shows the nodes that were not accessed by TSM for more than x days and then do an E-mail notification from there. I AM RUNNING TSM 4.1.5 on z/OS 1.1. The select command to get the node name, last access date, and contact name (the e-mail address) seems easy enough. BUT I want the output from this to be in one line, preferably with fixed position or filed lengths. ( I will be using SAS processing to setup the job that will actually do the EMAIL). I have tried the approach documented in the 3rd chapter of the TSM Refernece manual but I can not get the desired results. It always comes back with the output for 1 node with last access and contact name using two lines. Has anyone ever had any success with this in OS390 environment? I could go a long way with an example . Thanks Matt Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.