why for interactive procedures?

Reply
N/A
Posts: 0

why for interactive procedures?

hai please, can any of you explain me what are these interactive procedures like proc datasets. how they differ from other procedures, and why they need the quit statement in spite of only run statement. i feel these are very fundamental questions but some where am unable to resolve this doubt. pls find some time to explain me it.

and one more thing is both the contents and datasets procedures give the contetns of mentioned sas data library along with discriprtive protion of datasets. then what is the basic difference they can produce.

waiting for the responses....
i found so many experienced sas programmers in this forum. and i felt myself as i have reached the heven with sas. thanks to all you sas buddies.

cheers,
bhav
Super Contributor
Posts: 260

Re: why for interactive procedures?

Hi Bhav.
I think the interactive procedures come from the Old Times where it had a real cost to retype parts of programs. The idea behind interactive procs is to easily follow a trial-and-error process ; submit a first draft, see how it turns out, and then a second test, and so on. This is why Datasets, SAS/Graph and some statistical procedures (such as Proc Reg & GLM) are thought this way.
For example :
[pre]
PROC GCHART DATA = sashelp.class ;
VBAR age ;
RUN ;
/* well, as I see the output, it lacks a DISCRETE statement */
VBAR age / DISCRETE ;
RUN ;
/* I'd better do sub-bars from sex */
VBAR age / DISCRETE SUBGROUP=sex ;
RUN ;
/* and so on ... */
QUIT ; /* this is the real end of the Gchart procedure */
[/pre]
It is quite different for IML and SQL procedures : since you are coding in a different language, the QUIT statement is here to inform SAS that we are coming back to its "usual" programming language.
Cheers,
Olivier
N/A
Posts: 0

Re: why for interactive procedures?

how sweet you explanation. i understood well. thanks for the reply. i was just wondering for the answer since long. thanks much.

cheers,
bhav
SAS Super FREQ
Posts: 8,645

Re: why for interactive procedures?

Hi:
Also, as for the difference between PROC CONTENTS and PROC DATASETS. I think of PROC CONTENTS as an "information-only" procedure. It reports on the contents of a SAS dataset.

PROC DATASETS goes one step beyond "information-only" -- it can also produce a report on the contents of a SAS datasets, but that is merely a by-product of its more powerful ability to do things like modify a SAS dataset, delete a SAS dataset, rename a dataset, change labels or formats, etc. PROC DATASETS is what I call a "utility" procedure -- for example, let's say I create a dataset with a bunch of variables and I forgot to add labels and formats -- I could go back and reread the input file all over again, but with PROC DATASETS, I can make those changes to the descriptor portion of the SAS file without going back and rereading the original input file. The documentation on PROC DATASETS is quite thorough and the overview gives a better description than I have:
http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/datasets-overview.htm

cynthia
Post a Question
Discussion Stats
  • 3 replies
  • 653 views
  • 0 likes
  • 3 in conversation