How to run SAS using batch if I do not have it locally - sas

Is there a way to run SAS using batch if I don't have the sas.exe in my machine?
My computer has the SAS EG but the code is ran on our companies servers
Thanks

If you are asking whether it is possible to run SAS batch on your local machine without having SAS on your local machine, the answer is no.
If you are using EG to connect to a SAS server, and you want to execute a batch job on the SAS server, that is possible (just not with EG). For example, if you have terminal access to the SAS server via putty or whatever, you can do a batch submit.

Enterprise Guide is quite capable of scheduling jobs, whether or not you have a local SAS installation.
Wendy McHenry covers this well in Four Ways to Schedule SAS Tasks. Way 1 is what you probably are familiar with ('batch'), but Ways 2 through 4 are all possible in server environments.
Way 2 is what I use, which is specifically covered in Chris Hemedinger's post Doing More with SAS Enterprise Guide Automation. In Enterprise Guide since I think EG 4.3, there has been an option in the File menu "Schedule ...", as well as a right-click option on a process flow "Schedule ...". These create VBScript files that can be scheduled using your normal Windows scheduler, and allow you to schedule a process flow or a project to run unattended, even if it needs to connect to a server.
You need to make sure you can connect to that server using the credentials you'll schedule the job to run under, of course, and that any network connections are created when you're not logged in interactively, but other than that it's quite simple to schedule the job. Then, once you've run it, it will save the project with the updated log and results tabs.
If your company uses the full suite of server products, I would definitely recommend seeing if you can get Way 3 to work (using SAS Management Console) - that is likely easier than doing it through EG. That's how SAS would expect you to schedule jobs in that kind of environment (and lets your SAS Administrator have better visibility on when the server will be more/less busy).

Related

DOS commands in SAS Enterprise Guide

I'd like to run some DOS commands in SAS Enterprise Guide. I did it in 9.3 and used the X command. For example: x 'mydir';
X is disabled in Enterprise Guide, as far as I can tell. Mine hangs when I try to use it.
Is there a straightforward way to run DOS commands in Enterprise Guide?
Enterprise Guide is just a front end to submit SAS code to a remote process/server where SAS itself is running. So Enterprise Guide is never going to run any commands.
If the XCMD option is turned on in the SAS session that your Enterprise Guide project is using to run SAS code then the SAS code submitted by your Enterprise Guide process could use the X, SYSTEM or a filename PIPE to run operating system commands. And if the system where that SAS session is running is using the Windows operating system then you could submit "DOS" commands from your SAS code.
But if the system where SAS is running is using UNIX then you could only submit UNIX commands.
And if the XCMD option is disabled then you cannot submit any commands.
If you want to submit commands to run on the machine where you are running Enterprise Guide then you would need to have SAS for Windows installed on that same machine and be connected to that version of SAS (versus some other SAS application server you might have access to).
In order to have Enterprise Guide perform local operating system interactions you can also create a custom add-in. From the documentation
Overview
Custom add-in tasks are .NET assemblies (DLL files) that you create, deploy, register in SAS Enterprise Guide, and execute from the SAS Enterprise Guide task list or add-in menu.
To provide access to custom tasks based on the job responsibilities, you can register custom tasks as capabilities, assign capabilities to roles, and assign users to roles.
Create Custom Tasks
To create custom tasks, you develop Windows executables and package them as .NET assemblies. It is convenient to assemble multiple tasks in a single .NET assembly so that you can share code and implementation among the tasks. For additional information, sample DLLs, and sample executable source files, see the topic “Creating Custom Add-In Tasks for SAS Enterprise Guide,” at Custom Tasks.

Sync postgres database via git

We are 3 students working on a django project with postgres database and we sync our project with eachother via a git repository like gitlab. we have different os (windows 10 and linux ubuntu 20). and we use vscode as IDE.
How can we sync our entire database (data entry) via git (like sqlite) ?
Is there any way to handle it via kind of converting our db to file ?
Its very complicated to sync your three local database. The best way is to host your database into a cloud platform and all 3 of you connect to that.
There are free cloud platform you can use for 1 year like amazon web service, google cloud platform. You just need an active debit/credit card, it won't charge you except for amazon, it will deducted 1 dollar for account verification.
I would definitely go with this answer.
If you do not want to do that, use pg_dump to export the data from the database as a text file and sync that one using git. But you might still get a lot of merge conflicts.
I use https://www.elephantsql.com/ for it and it works! thank you

How can I schedule a stored process in SAS DI Studio?

I would like to use Enterprise Guide as a development environment for creating a SAS job (Base SAS code only), but I then need to use DI Studio to schedule that job to run at a particular time.
I want to use EG for developing the job because I believe it is a better development environment (program editor etc.) than DI.
I also want the job to exist as a stored process so that users can run it outside the schedule if necessary.
Can I create a simple DI Studio job that merely calls an existing stored process?
Of course - there are many ways to achieve this. One is to create a separate job (with 'user written code' component) and Stored Process, both of which simply %include your Enterprise Guide program.
Another is to create your stored process using Enterprise Guide, and then in DI Studio (user written code) call the stored process directly using proc stp (see documentation)
Yet another is to paste your EG code into DI Studio and 'deploy job as stored process' - documentation for that is here.
Oh, and to answer your 'headline' question - you don't schedule jobs in DI! The deployed .sas code can be scheduled via Schedule Manager (SMC), the OS itself, or other third party tools (eg LSF).

Exporting VM/vAPP in vCloud environment

We have a customised vCloud environment. We are trying to download the vAPP image as ovf file for migrating it to some other environment. I am following this procedure
Stop the VM.
Click on download button on setting
It asks for download location and type of image (ova/ovf).
It initiates the download.
Now my problem lies on 4th step. When I click download it initiates download and I could see "enabling download" when it happened. After some unknown time(can't predict the time may be 2hr, 3hr 4hr, 1hr) the process gets failed. I have to repeat the process multiple times(at least 3 to 5 times) to start the actual download process where it actually copies the VM image on disk.
I am not able to predict the actual time of VM download and why the process get failed many time before it start the actual export process.
Can someone tell me answers of below mentioned questions
Does vCloud enable download functionality before it allows us to download the VM? If it does how much time it takes for this functionality to enable.
Can we enable this functionality beforehand so that vCloud should just start the VM download process instantly once I shutdown the machine and start the VM export process?
Do you think using CLI tool like ovftool will make the process faster and prevent it from failing so that I will get to know the actual VM download time and we can prepare a plan for migration?
From my limited understanding of working with the API and SDK, I do not think 1 is possible... if it is... it's not straightforward.. at least to me
as for #3 if you are not using the CLI for scripting and automating purposes, yes it would definitely help

Job Scheduling in SAS Data Integration Studio

i want to schedule a job in SAS-DIS. i tried the process using sas management console,bt an error is popping up saying scheluing server not found.
can anyone help me how to setup a scheduling server? or is it a software to be installed?
Thanks
I think a scheduling server is an extra package that has to be purchased. Our BI setup is lacking that option and no matter what we can't seem to get it approved. Check with your SAS server admin to see if the job scheduling has been enabled. If so he/she should be able to tell you the process for getting it scheduled.
Alternatively, without a scheduling server you still deploy your jobs and can either use
1. Cron and Crontab (in Unix or Linux)
2. Windows OS scheduler
to schedule jobs manually as this is the best option available if there is none. I know this can be very tedious and cumbersome , but can give it a try if you have less number of jobs to schedule.