Date: Thu, 19 Feb 2004 14:28:26 +0100
Reply-To: "Karlsen, Terje" <terje.karlsen@SSB.NO>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Karlsen, Terje" <terje.karlsen@SSB.NO>
Subject: Re: Viewtable
Content-Type: text/plain; charset="iso-8859-1"
I have run into a problem with sorting the table before it
opens in Viewtable.
How do I sort tables when opening in edit mode in Viewtable?
The table I want to open is an Oracle table, and my code looks like this:
rc = exist(table,'DATA');
if (rc) then do;
arglist = makelist();
rc = insertc(arglist,table,-1,'open');
rc = insertc(arglist,'edit',-1,'openmode');
rc = insertc(arglist,'row',-1,'accesslevel');
call display ('sashelp.fsp.vtmain.frame',arglist);
end;
I can't seem to find a way how to sort an Oracle table and open it into viewtable.
--
Terje Karlsen
Statistics Norway
-----Opprinnelig melding-----
Fra: Richard A. DeVenezia [mailto:radevenz@IX.NETCOM.COM]
Sendt: 13. februar 2004 14:57
Til: SAS-L@LISTSERV.UGA.EDU
Emne: Re: Viewtable
"Karlsen, Terje" <terje.karlsen@SSB.NO> wrote in message
news:20D63BD766432A48A1D49685DD8D211604604B@EVS01.ssb.no...
> Hi!
>
> I have been using fsview to open and/or edit oracle tables from an SAS/AF
application.
> In the SCL code I would thenuse a statement like
> call fsview(table,'edit');
>
> But fsview seem a bit outdated and I would rather want to use Viewtable.
> From command line I can use the command 'viewtable table'
> but is there any way to access Viewtable from within SCL-code ?
>
> Regards,
> Terje Karlsen
> Statistics Norway
Terje:
There is an entry point in sashelp.fsp. Here are two ways, one uses
execcmdi, the other uses the entry point.
Presume the table name is in a text entry control.
init:
textentry1.text = 'sashelp.class';
return;
pushbutton1:
* non-modal, control returns to AF while VT is running;
* vt is alias of command viewtable;
call execcmdi('vt ' || textentry1.text);
return;
pushbutton2:
* modal, control returns to AF after VT exits;
args = makelist ();
rc = setnitemc (args, textentry1.text, 'OPEN');
rc = setnitemc (args, 'EDIT', 'OPENMODE');
rc = setnitemc (args, 'TABLE', 'ACCESSLEVEL');
call display ( 'sashelp.fsp.vtmain.frame', args);
args = dellist (args);
return;
Here are the items that can be in the args list
ACCESSLEVEL
COLHEADING
COLUMNS
DATAFORM
DSOPT
EXECCMD
INCLUDE
LIKE
MENUBAR
MODELSCL
NEW
OPEN
OPENMODE
TOOLBAR
VIEW
WHERE
--
Richard A. DeVenezia
http://www.devenezia.com/downloads/sas/af/