• Execute SAS on Mainframes in Interactive mode…

    Posted on May 20, 2012 by in Running SAS, SAS, SAS Tips & Tricks

    Interactive Processing is used for any of the interactive SAS systems (ASSIST, CALC, etc.), for SAS/GRAPH when the graphics output is to be displayed on the screen of a graphics terminal, or when wanting to see the results of a relatively small SAS program without the need for printed output.

    Execute the SAS program as you are sitting in front of your terminal, and see the results of each DATA or PROCedure step as it completes. The program could be entered using ISPF before invoking SAS and then included into the interactive session, entered under the Display Manager during the interactive session, or there can be no actual programming required (as when using SAS/ASSIST).

    To invoke interactive SAS, from the READY prompt or from the ISPF Primary Options Panel, enter:

          SAS
    

    This will put you into the Display Manager with the PROGRAM EDITOR window at the bottom of the screen and the LOG window at the top of the screen. From here you can enter your SAS program, invoke ASSIST, etc. To end an Interactive SAS session, enter BYE at the COMMAND line.

    This tutorial assumes that you are using IBM os/390 with Humming Bird Exceed X Window Display manager available at your site.

    Invoke your X-window session and type TSO and Enter

    SAS on Mainframes

    Enter your Username

    SAS on Mainframes - Enter Username

    Enter your password

    SAS on Mainframes - Enter Password

    Type SAS at the READY prompt

    SAS on Mainframes - Ready Prompt

    This should open the SAS Windowing Environment on Mainframes.

    SAS on Mainframes - Windowing Environment

    Use this commands at the command prompt

    1. explorer – open the explorer window

    2. bye – quit the SAS session

    3. log – to view the log window

    4. F8 key – switch between windows

    5. F10 – to give the File Menu

    SAS on Mainframes - File Menu

    6. F11 – open the shortcut keys

    SAS on Mainframes - Shortcut Keys

    7. clear – to clear the contents of the window

    8. program – to open the program editor

    9. submit – Enter the code and hit F3 to submit the code.

    SAS on Mainframes - Submit

    10. recall – to recall the submitted program.

    11. Hit F10 key to open the File Menu…Double click the mouse on the Menu item to open the Menu item.

    SAS on Mainframes - Menu Item

    This menu is similar to the File Menu in PC SAS.

    12. Browsing datasets and catalogs is kind of tough with Interactive SAS. It is better to use Proc Print/ Report or any other reporting procedures in SAS. SAS uses FSBROWSE procedure to view the dataset. Inorder to view –

    13.
    a. type explorer

    SAS on Mainframes - explorer

    b. type b against the dataset to browse the dataset…to close the dataset hit F10 and then close under file menu.

    SAS on Mainframes - Menu Options

    SAS on Mainframes - Menu options

    SAS on Mainframes -- Menu Items

    Proc print output: Press up and down to browse each record in the dataset.

    SAS on Mainframes

    c. type bye to close the SAS session.

    Initially it might look a bit tedious…but once u get used to it….it will be fun…
    Proc print / report is the way to go for instant browsing…

    All SAS program syntax / statements / functions and execution is similar to PC SAS except for the way you reference the operation system files, libraries and other procs change which are native to the OS.

    Alternatively SAS programs could be executed using Batch mode on Mainframes using Job Control Language (JCL)..

    Be Sociable, Share!

    Written by

    View all articles by

    Email : [email protected]

    Leave a Reply