f



Storing SAS-programs and -macros in SAS-catalogs

Hi!

I am working on a mainframe-platform where SAS-programs and -macros
are stored in PDS-datasets. However this way of storing is
platform-dependent in the sense, that access from a PC is a little
difficult.

Storing programs and macros in SAS-catalogs solves this
platform-dependent-problem (and a great advantage in this context is
that you can easily add a mainframe-SAS-catalog containing macros in
your 'sasautos' on a PC), but working with catalogs on a mainframe
seems to be a little more awkward than just working with PDS-datasets,
because the SAS-editor supports PDS-datasets very directly, e.g. you
can write 'mem pgm', 'inc pgm(testpgm)', 'file pgm(testpgm)' etc.

My question now simply is: How do you work with catalogs when it comes
to:
- allocating new catalogs
- editing existing members
- adding new members
- including members in the editor and storing again in the catalog
- etc.

Regards,
Jesper
0
10/30/2004 11:11:19 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

2 Replies
778 Views

Similar Articles

[PageSpeed] 46

Hello Jesper and other SAS-L Friends,

Perhaps David Chapman's fine paper will help:

http://www2.sas.com/proceedings/sugi29/051-29.pdf

The SAS OnlineDoc would be a good place to look, too:

http://support.sas.com/documentation/onlinedoc/index.html

HTH.

- Michael "Mad Doggy" Davis

At 04:11 PM 10/30/2004 -0700, Jesper Sahner <jespersahner@HOTMAIL.COM> wrote:
>Hi!
>
>I am working on a mainframe-platform where SAS-programs and -macros
>are stored in PDS-datasets. However this way of storing is
>platform-dependent in the sense, that access from a PC is a little
>difficult.
>
>Storing programs and macros in SAS-catalogs solves this
>platform-dependent-problem (and a great advantage in this context is
>that you can easily add a mainframe-SAS-catalog containing macros in
>your 'sasautos' on a PC), but working with catalogs on a mainframe
>seems to be a little more awkward than just working with PDS-datasets,
>because the SAS-editor supports PDS-datasets very directly, e.g. you
>can write 'mem pgm', 'inc pgm(testpgm)', 'file pgm(testpgm)' etc.
>
>My question now simply is: How do you work with catalogs when it comes
>to:
>- allocating new catalogs
>- editing existing members
>- adding new members
>- including members in the editor and storing again in the catalog
>- etc.
>
>Regards,
>Jesper

Michael L. Davis
Ambler  PA
E-Mail:  michael@bassettconsulting.com
Web:  http://www.bassettconsulting.com
0
michael193 (218)
10/30/2004 11:29:14 PM
Jesper,

It has been a while since I have been on an MVS system, but if the catalog
access method of the filename statement works on MVS you should be able to
allocate a filename with a catalog. Once you do that, you should be able to
use the syntax you specified below.

I ran the following in 8.2 on Windows XP and it worked:

filename test catalog 'work.junk';
data _null_;
 file test(a.source);
 put 'it worked';
run;

The catalog did not exist, but the data _null_ step created the catalog and
the entry a.source.

You will typically not want to put things in work. To point to a catalog in
an existing SAS data library, you will need to first allocate the library,
e.g.,

libname mylib 'your OS name';

then

Filename mycat catalog 'mylib.catalogname';

Again, I was not able to try this on MVS so YMMV.

HTH,
-don h


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Jesper
Sahner
Sent: Saturday, October 30, 2004 6:11 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Storing SAS-programs and -macros in SAS-catalogs

Hi!

I am working on a mainframe-platform where SAS-programs and -macros are
stored in PDS-datasets. However this way of storing is platform-dependent in
the sense, that access from a PC is a little difficult.

Storing programs and macros in SAS-catalogs solves this
platform-dependent-problem (and a great advantage in this context is that
you can easily add a mainframe-SAS-catalog containing macros in your
'sasautos' on a PC), but working with catalogs on a mainframe seems to be a
little more awkward than just working with PDS-datasets, because the
SAS-editor supports PDS-datasets very directly, e.g. you can write 'mem
pgm', 'inc pgm(testpgm)', 'file pgm(testpgm)' etc.

My question now simply is: How do you work with catalogs when it comes
to:
- allocating new catalogs
- editing existing members
- adding new members
- including members in the editor and storing again in the catalog
- etc.

Regards,
Jesper
0
10/30/2004 11:37:58 PM
Reply:

Similar Artilces:

SAS Advanced Programming Exam for SAS 9: SAS Joke of the year.
Sick joke, not funny. You would have thought that adding the 9 tag to the exam would have meant testing the ability of using version 9. Not so. The exam doesn't test the ability of version 9. It doesn't even test the ability of using SAS. It tests one's ability of guessing the right answer, because on a lot of the questions that's all you can do. We cannot take material out of the test centre, so I am relating these issues from memory, but 42 is the answer to the Universe, and this one did stick in my memory. Question 42: Correct answer: None of the above. They have swapped ...

Running a SAS program within a SAS program
Hello, I would like to combine multi years of data into one. Each year has a particular data set and a particular program to create a SAS dataset. However, not all programs are the same (e.g. variable names may change throughout the years). What I would like to do is to create one program that would call on the other programs to create SAS datasets. Then I'll integrate them together and do whatever I it is I need to do. I hope someone can help me. Thanks. Kathleen ...

SAS programming and SAS/BI
I'm considering a position that deals mostly with SAS/BI, but I currently do SAS programming. >From what I've read, it hasn't been to clear what all is involved with SAS/BI in terms SAS programming. So I take it there's really isn't much programming involved. So is SAS (i.e. data steps, procs, etc.) the back-bone of SAS/BI and is SAS code generated using the graphical interface of SAS/BI which can be saved and further customized ? Thanks. <div>Auto..,</div> <div>&nbsp;</div> <div>&nbsp;</div> <div>&gt;From what ...

Running SAS programs from within a SAS program
Dear All, I have several small(ish) SAS programs that convert and format DBF files. Thanks to all who helped solve formatting problems. I would like to create a master SAS program that calls each one in sequence. Any ideas? Cheers, Keith __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com Keith, You can use a series of %include statements naming the programs in the order you want to call them in. %include "drive:\your_folder\program name.txt" ; Mah-J M. Soobader, PhD Principal consultant STATWORKS www.s...

Run a sas program in another sas program
Dear SAS Servlisters: I am a Stata user, and am trying to learn SAS too. In Stata, in a syntax file, I can write something: do dofile1.do do dofile2.do do dofile3.do Then it will invoke dofile1-dofile3 and run the contents in these do files. So that if I have a series of consecutive data management and analysis jobs in different do files, I can execute them by running one file that contains a series of do commands without having to open those files and run them one by one. This is critical when I don't want to mess up my analysis with data management; that is, I'd like to put syntax...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year.
I took the advanced exam this April because I wanted a relatively systematic way of assessing my knowledge of SAS in a short time span. For that purpose, it was worth it. Since I learn SAS by doing new tasks, or re-doing old tasks in a new way, I assume my knowledge of SAS is uneven, even though I am regarded as productive, and frequently creative in using SAS to solve our group's problems. I passed the test, with lower subscores on the components that I expected to be weakest on. I thought many of the questions made me think about some fundamental, sometimes subtle, features of the lan...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #3
Okay, I think I need to weigh-in on this. First, the exam is designed to test what you know about how SAS works. I think it does a fair job at that. (I say so partly because I only scored 89 on the exam. Now, I didn't prepare for the exam; I was really testing the exam when I took it as opposed to using the exam to test my skills.) The exam doesn't know how well you can program. There is a big difference between having a large vocabulary and knowing the rules of grammar and knowing how to write. Similarly, there's a big difference between knowing how SAS works and knowing how...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #11
Kevin, Thank you for the nice words...I am sure I wouldn't have a chance on any stat exam, BTW. What I am good at is being in an absolute crisis and trying to get it solved with no time on the clock. That is why I think in a quirky manner. When the obvious isn't working, take a different path because there is simply no time left. It's what I did at MCI, SAS, and now as an independent. ....and that skill will not be measured on a certification exam or plopping me in front of a PC to hammer out an example SAS program. For any candidate, I can pick up their technical level with a few questions and watching their reactions. Alan Alan Churchill Savian www.savian.net -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kevin Roland Viel Sent: Tuesday, September 04, 2007 4:02 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. On Tue, 4 Sep 2007, Alan Churchill wrote: > It seems that a test like this would toss me out of the pool from the > get-go. Heck, maybe that's what the goal would be ;-] Well then, maybe the rest of us might have a chance then :) Given that I have not used SAS regularly in months, I would be hurting. Hopefully, I would not be tossed immediately either. Isn't one point of the test to allow a organization to call itself a partner or some other distinction? Maybe to be listed among companies on SI's websites? Kevin Kevin ...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #4
Ed , I still contend and stick with they should both be able to program and know how SAS works. I prefer the intervewing company give a test, were the person being interviewed is sat in front a laptop or desktop and told to write code to solve some problems. No online help no books just the persona nd the computer. This weeds out those who can code and those who cant, from those who can you then talk to them about the code they wrote and you can deduce those who understand how SAS works and thos who dont. The pool you are left with are the qualified candidates atleast from a SAS perspecti...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #8
On Tue, 4 Sep 2007, Alan Churchill wrote: > It seems that a test like this would toss me out of the pool from the > get-go. Heck, maybe that's what the goal would be ;-] Well then, maybe the rest of us might have a chance then :) Given that I have not used SAS regularly in months, I would be hurting. Hopefully, I would not be tossed immediately either. Isn't one point of the test to allow a organization to call itself a partner or some other distinction? Maybe to be listed among companies on SI's websites? Kevin Kevin Viel, PhD Post-doctoral fellow Department of Geneti...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #5
Good deal Bob, atleast that company was headed in the right direction IMO... I have given such tests and taken them. I ussually give them a data set, the specs I want them to follow, and a example of what I want the output to look like. Then I tend to give them like 4 or 5 hours if they need it to complete the project. In reallity they should be done in an hour or so. The test should be challenging but not too challenging, and the solution should involve a few data steps, procedures, and some type of reporting..... Toby Dunn Comprimise is like telling a lie, it gets easier and easier....

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #2
jontugman, Test preparation is akin to following a simple algorithm: 1. Evaluate the test and discover if it is worth taking. 2. If #1 evaluates false then go to exit. 3. Determine if your *test* knowledge of SAS is insufficient. 4. If #3 evaluates true, do the test preparation. 5. Pay the money. 6. Take the test. 7 Exit. From your standpoint, the step of paramount importance is step #1. That is where you mainly failed. From SAS' standpoint, only one step matters: #5. This is the only reason the test was created in the first place. The world would be a better place if all employers un...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #6
I interviewed at a company that gave a test where I had a half hour to produce a very simple report using PROC REPORT. I was provided all the manuals I wanted, but because I had used PROC REPORT before, I wanted none of them. I finished in five minutes, and most people on SAS-L would be able to beat that time. Bob Abelson HGSI 240 314 4400 x1374 bob_abelson@hgsi.com "toby dunn" <tobydunn@HOTMAIL.COM> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 09/04/2007 05:15 PM Please respond to "toby dunn" <tobydunn@HOTMAIL.COM> To SAS-L@LISTSE...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #9
ALan , Lets keep this to straight SAS, I dont tell people what they should use in SAS to produce the report, but rather I say here is what the report should look like, here i sthe data set, here ar the specs, now go make it happen. If your hirng a junior level programmer they should know the data step and say proc sort, proc print, proc format. If your going after a Senior level programmer the test should be harder and reflect more things like ODs, macro, etc... In your case you dont promote straight SAS solutions and that is great, but a whole other market than a straight SAS programmer. ...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #7
Well Toby, let me ask something then. Since I am not an ODS fan and haven't used proc report/tabulate for some time, would that be an automatic disqualifier since you don't allow reference books or materials? SAS does not provide tools that help me code ODS (except for EG) and therefore a reference material is all I would need. Now, it's not like I haven't used proc report (used it extensively at one time), it's just that I prefer other means to produce the final output. It seems that a test like this would toss me out of the pool from the get-go. Heck, maybe that's wh...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #10
I actually think you are straight-jacketing the interview for a senior person. I would definitely look for someone who thought outside of the box. That may be ways of doing things other than macros or ODS or else putting a new spin on them. I ditched most of the macro language a decade ago, for example. As a hiring manager, I always went for creativity and not specific skills on hand and was very pleased with my hires. But hey, I don't hire anymore so it isn't something I have to face. BTW, no client has ever asked me for certification nor have I been quizzed on specific SAS knowledg...

Can a SAS program call another SAS program
People, I am writing a report that counts the number of widgets produced by partners. I have a small routine that finds the partners id number and name. Obviously I could copy this code into my program and execute it. I was wondering if there was a more elegant way of "Calling" a SAS program from within a SAS program. I am running SAS 8.1 in windows. Thanks Dave Dave Fickbohm Data Mining Analyst Homegain+ 2450 45th St. Emeryville, CA, 94608 Phone 510 655 0800 ext 4151 ...

Re: Running SAS programs from within a SAS program
Keith, You can use a series of %include statements naming the programs in the order you want to call them in. %include "drive:\your_folder\program name.txt" ; Mah-J M. Soobader, PhD Principal consultant STATWORKS www.statworks.com -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Keith W. Larson Sent: Friday, November 18, 2005 10:32 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Running SAS programs from within a SAS program Dear All, I have several small(ish) SAS programs that convert and format DBF files. Thanks to all who helped solve...

Re: Running a SAS program within a SAS program
%include() On Mon, Apr 21, 2008 at 12:55 PM, Kathleen Santos <flowerpotcat@gmail.com> wrote: > Hello, > > I would like to combine multi years of data into one. Each year has a > particular data set and a particular program to create a SAS dataset. > However, not all programs are the same (e.g. variable names may change > throughout the years). > > What I would like to do is to create one program that would call on the > other programs to create SAS datasets. Then I'll integrate them together and > do whatever I it is I need to do. > > I ...

Reusing code from SAS Program in another SAS Program
I write SAS programs on the Mainframe. I have several programming steps in multiple programs that use the same IF statements, for example. Maintenance is getting to be a problem because I may have to make the same code change in 50 different programs. I would like to write the If statement only once and read it into the appropriate data steps of the various programs. If someone could give me help on how I could do this, it would be appreciated. Keith - Store your code snippets in a PDS and then %include into your programs. For example this program includes a format called "$REGCRT...

How to run several SAS programs in one sas Program
Hi, Is it possible to run several SAS programs in one sas Program. I can use the %INCLUDE, but is there another way? Tx On Mar 18, 5:31=A0am, laika <michel.verhe...@axa.be> wrote: > Hi, > > Is it possible to run several SAS programs in one sas Program. I can > use the %INCLUDE, but is there another way? > > Tx If you want to read each program as a separate batch program you can use SYSTASK. systask (or %systask) is a good option. If you want to run several programs on different machines (local or remote) then "rsubmit" could be of use:...

Need help with SAS X command to restart to SAS Object Spawner in a SAS Stored Process.
Hi, I am trying to restart the SAS Object Spawner via a SAS Stored Process. If I test this code in Base SAS it works ok but when I use it in a Stored Process and run it in SAS Enterprise Guide or the SAS Webbapp it does not error but does not restart the Object Spawner. The .bat file contains this net stop "SAS Object Spawer" net start "SAS Object Spawner" I have enabled the x command which works ok as I can unzip a file on the O/S (Windows 2003) from a SAS STP. %let live=Yes; %if &live=Yes %THEN %DO; * Restart the SAS Object Spawner; options noxw...

Re: Running SAS programs from within a SAS program #2
Or better when programs are in one directory file code "drive:\your_folder\" ; %inc code ( prog1 prog2 prog3 ... ) ; Then the next step is parameter driven macros in an autocall library. %prog1(parm1=...) %prog2(alpha=...) ..... Ian Whitlock ================= Date: Fri, 18 Nov 2005 22:54:54 -0500 Reply-To: mah-j@statworks.com Sender: "SAS(r) Discussion" From: "mah-j@statworks.com" <msoobader@VERIZON.NET> Subject: Re: Running SAS programs from within a SAS program...

Re: Can a SAS program call another SAS program
> From: David Fickbohm > I am writing a report that counts the number of widgets produced by > partners. I have a small routine that finds the partners id > number and > name. Obviously I could copy this code into my program and > execute it. I was wondering if there was a more elegant way > of "Calling" a SAS program > from within a SAS program. > I am running SAS 8.1 in windows. still!?!? surely that is a typo: 9.1? i.e.: -The- 9.1==9.1.3 include it: - - - subRoutineX.sas - - - *...; - - - subRoutineX.sas end - - - - - - autoexec.sas - - - filen...

SAS CONNECT/SAS Display Manager or BASE SAS
Hi, We have SAS EBI Server license. Many or our SAS Programmer wants to use BASE SAS (or SAS Display Manager) instead of SAS Enterprise Guide. But As you know Windows Server comes with only two terminal licenses. I see that we have SAS/CONNECT license (which came with BI suite). Can I install BASE SAS on PC and use SAS/CONNECT to run code on the server? Or Do we have to buy PC license for BASE SAS? What's options we have. Please help. Thanks On Oct 21, 8:11=A0am, abcu...@YAHOO.COM (Abc Unha) wrote: > Hi, > We have SAS EBI Server license. Many or our SAS Programmer wants to =A0us...

Web resources about - Storing SAS-programs and -macros in SAS-catalogs - comp.soft-sys.sas

Resources last updated: 2/29/2016 11:38:16 AM