Page 1 of 1

Writing 'Hello World' program in SAS.

Posted: Thu Feb 15, 2018 12:55 pm
by Ashish Mathew
Hi,

I plan to learn SAS. I recently came to know that in my project we have SAS available on mainframes. Could any one please guide me from where I can start writing SAS program so that it can help me to debug or enhance the existing SAS programs too?

Re: Writing 'Hello World' program in SAS.

Posted: Thu Feb 15, 2018 2:43 pm
by enrico-sorichetti
a forum is not a training center, speak to the powers of your organisation asking to be provided with proper training

Re: Writing 'Hello World' program in SAS.

Posted: Thu Feb 15, 2018 4:19 pm
by nicc
Why have you not searched the internet for SAS tutorials?

Somewhere in your organisation there will be manuals.

Re: Writing 'Hello World' program in SAS.

Posted: Thu Feb 15, 2018 6:06 pm
by Robert Sample
This is one of those cases where you MUST contact your site support group -- SAS can be installed in different ways and hence the way to access SAS on your mainframe may not be the same as anywhere else in the world. We do not work for your organization so we do not know how you need to access SAS. Contact your site support group.

Re: Writing 'Hello World' program in SAS.

Posted: Tue Feb 20, 2018 6:55 pm
by Ashish Mathew
Thanks Robert. I have asked that support but they don't want to entertain such requests.

In order to search a sample I found this pdf https://www-03.ibm.com/support/techdocs ... amming.pdf

But when I tried to execute the sample Job there:

Code: Select all

//SAS01    EXEC SAS                
//SYSIN    DD *                    
DATA RAJU;                         
     YEAR =  YEAR(TODAY());       
     MONTH = MONTH(TODAY());      
     DAY   = TODAY() ;            
PROC PRINT DATA=RAJU;
but it failed with:

Code: Select all

IEFC612I PROCEDURE SAS WAS NOT FOUND
For that I have also searched in our system how it is coded for SAS, where I found a job which has got MXGSAS as procedure:

Code: Select all

//TYPE30   EXEC MXGSAS,MXGHLQ='Axxxxx.MXG.V12R440',
This job extracts SMF type 30.

Re: Writing 'Hello World' program in SAS.

Posted: Tue Feb 20, 2018 7:37 pm
by enrico-sorichetti
ONLY YOUR SUPPORT KNOWS HOW SAS WAS INSTALLED AND HOW TO INVOKE IT
if they do not wish to collaborate nothing we can do

Re: Writing 'Hello World' program in SAS.

Posted: Wed Feb 21, 2018 9:03 am
by Robert Sample
If your site support group will not help you, either you need to change your goals or learn how to research things on your own. I'd start by using ISPF search (3.14 usually) on SYS1.PROCLIB to find out which procedures invoke SAS -- but then, I am a systems programmer with unlimited access to the system. Application programmers usually are not allowed to do much with SYS1.PROCLIB. If MXGSAS is a procedure, then SAS is installed somewhere. Possibly the procedure is SAS94 or SAS93 or SAS921 (etc) where the version is part of the procedure.

Re: Writing 'Hello World' program in SAS.

Posted: Sat Apr 14, 2018 6:06 pm
by Ashish Mathew
Robert Sample wrote: Wed Feb 21, 2018 9:03 amIf your site support group will not help you, either you need to change your goals or learn how to research things on your own. I'd start by using ISPF search (3.14 usually) on SYS1.PROCLIB to find out which procedures invoke SAS -- but then, I am a systems programmer with unlimited access to the system. Application programmers usually are not allowed to do much with SYS1.PROCLIB. If MXGSAS is a procedure, then SAS is installed somewhere. Possibly the procedure is SAS94 or SAS93 or SAS921 (etc) where the version is part of the procedure.
Thanks a lot Robert.

I do not want to loose track of this learning opportunity so have been searching SAS for Windows too but as far I understood we can not use the Windows SAS programs on mainframes ?

Re: Writing 'Hello World' program in SAS.

Posted: Sat Apr 14, 2018 8:30 pm
by Robert Sample
SAS code is portable across platforms -- SAS code I write on the mainframe can generally be executed without any changes on a Windows SAS installation, and vice versa. I say generally because if the SAS code is dependent upon the collating sequence, changes will be required when moving from platform to platform. Not all sites install Windows SAS -- the last time I used it, the base cost was about $4,000 for base SAS and another $4,000 for the statistics package.

Re: Writing 'Hello World' program in SAS.

Posted: Tue Apr 17, 2018 12:22 am
by vasanthz
You said you have a job on your system something like this

Code: Select all

//TYPE30   EXEC MXGSAS,MXGHLQ='Axxxxx.MXG.V12R440',
Try this program,

Code: Select all

//TESTING   EXEC MXGSAS,MXGHLQ='Axxxxx.MXG.V12R440',
//...          <- complete the EXEC statement as there is a ,
//SASCODE  DD   *                 
  PROC PRINT DATA = SASHELP.CLASS;
  RUN;                            
/*                                
That should get you started.

Re: Writing 'Hello World' program in SAS.

Posted: Tue Apr 17, 2018 12:22 am
by vasanthz
or

Code: Select all

//TESTING   EXEC MXGSAS,MXGHLQ='Axxxxx.MXG.V12R440',
//...          <- complete the EXEC statement as there is a ,
//SASCODE  DD   *
DATA RAJU;                         
     YEAR =  YEAR(TODAY());       
     MONTH = MONTH(TODAY());      
     DAY   = TODAY() ;            
PROC PRINT DATA=RAJU;

The below link has a picture of a super cute girl and link to download SAS.
Both of which could be used for "research purposes" :-)
https://www.sas.com/en_us/software/univ ... ml#windows

Re: Writing 'Hello World' program in SAS.

Posted: Tue Apr 17, 2018 2:44 am
by nicc
super cute girl
tastes vary!!

Re: Writing 'Hello World' program in SAS.

Posted: Tue Apr 17, 2018 3:51 am
by vasanthz
tastes vary and girls may vary.. but its annoying that they all ask the same set of questions
"How did you get into my house" or "Why are you covered in baby oil" or "Is it in?"

:(