Writing 'Hello World' program in SAS.

Statistical Analysis System and Cloud Computing.
Post Reply
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Writing 'Hello World' program in SAS.

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

Re: Writing 'Hello World' program in SAS.

Post by enrico-sorichetti »

a forum is not a training center, speak to the powers of your organisation asking to be provided with proper training
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Writing 'Hello World' program in SAS.

Post by nicc »

Why have you not searched the internet for SAS tutorials?

Somewhere in your organisation there will be manuals.
Regards
Nic
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Writing 'Hello World' program in SAS.

Post 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.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: Writing 'Hello World' program in SAS.

Post 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.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

Re: Writing 'Hello World' program in SAS.

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Writing 'Hello World' program in SAS.

Post 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.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: Writing 'Hello World' program in SAS.

Post 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 ?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Writing 'Hello World' program in SAS.

Post 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.
User avatar
vasanthz
Registered Member
Posts: 32
Joined: Tue Dec 06, 2016 1:06 am

Re: Writing 'Hello World' program in SAS.

Post 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.
Regards,
Vasanth.S
User avatar
vasanthz
Registered Member
Posts: 32
Joined: Tue Dec 06, 2016 1:06 am

Re: Writing 'Hello World' program in SAS.

Post 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
Regards,
Vasanth.S
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Writing 'Hello World' program in SAS.

Post by nicc »

super cute girl
tastes vary!!
Regards
Nic
User avatar
vasanthz
Registered Member
Posts: 32
Joined: Tue Dec 06, 2016 1:06 am

Re: Writing 'Hello World' program in SAS.

Post 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?"

:(
Regards,
Vasanth.S
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SAS & Cloud Computing.”