Date: Tue, 14 Jul 2009 08:59:29 -0400
Reply-To: Nathaniel.Wooding@DOM.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: DSN's third qualifier
In-Reply-To: <5768dacb-8867-4746-8630-3dd0253aff86@a39g2000pre.googlegroups.com>
Content-Type: text/plain; charset="US-ASCII"
If you mean that you have a DSN with multiple nodes as in
ooopro.node2.node3
and you want the third node, you can use the scan function to extract it
String = scan( DSN , 3 , '.' );
In V9, you can use a -1 to scan right to left.
Then, if you want the first three letters, use the substr function.
By the way, it would be more efficient to put the 1024*1024*1024 in a
constant and reference rather than calculate it twice for each obs.
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Cel Phone: 804-205-0752
StorageDevil
<rahulggg@GMAIL.C
OM> To
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Discussion" cc
<SAS-L@LISTSERV.U
GA.EDU> Subject
DSN's third qualifier
07/14/2009 08:43
AM
Please respond to
StorageDevil
<rahulggg@GMAIL.C
OM>
Hi,
I need to pull out and display the first three letters of my DSN's
third high level qualifier. What function can I use for that.
DATA
TEMP1;
SET
TEMP;
FORMAT SPACEUSED COMMA10. SPACETOT
COMMA10.;
SYSID=SUBSTR(DCUSYSID,
1,2);
DIG=SUBSTR(DCDDSNAM,
1,3);
REF=TODAY()-
DCDLSTRF;
SPACEUSED = (DCDUSESP*1)/
(1024);
SPACEUSED1 = (DCDUSESP*1)/
(1024*1024*1024);
SPACETOT = (DCDALLSP*1)/
(1024);
SPACETOT1 = (DCDALLSP*1)/
(1024*1024*1024);
IF (SYSID NE '9S') OR (DCDMGTCL NE 'MCNACT') OR (REF LE
180)
OR (DIG NE
'DB2')
OR (DCDSTGRP NOT IN
('DBPOOL','DEVLRG','DEVSML','IMTEST','PRDLRG')
AND (DCDSTGRP NOT IN
('PRDSML','SGSPARE','SGSPARE1','SYSDB2','VSAMSML'))
AND (DCDSTGRP NOT IN
('SYSPOOL','TMPPOOL','SYSDLG01','VSAMLRG')))
THEN
DELETE;
RUN;
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.
|