BookmarkSubscribeRSS Feed
kajal_30
Quartz | Level 8

I have I am working on a main frame program for the first time.When it says 

TABLE FILE CARS1

PRINT

CYLINDERS

COUNTRY

PRICE

MAKE

MODEL

WHERE PAL = 'DAV'

END 

FIN

 

as I don't have PAL variable in the actual dataset and where PAL = 'DAV' statement says put PAL = 'DAV' or it works as a regular where filter in base SAS or it main frame code work differently?

 

Thanks

KAJAL

2 REPLIES 2
Shmuel
Garnet | Level 18

The syntax for WHERE statement is equal on all SAS platforms - MF/Unix/Linux/Windows etc. 

You can check which variables are in dataset by running PROC CONTENTS.

I guess you got an exercise on sashelp.cars dataset.

Write a code and check - maybe PAL, if it doesn't exist it is a typo and replace it to

the right name.

Kurt_Bremser
Super User

What you posted is neither a SAS program nor a program in any other language on mainframes (JCL, COBOL, PL/1) I know of.

If you have trouble with a step in a SAS program, post the whole log of this step; use the </> button to post it.

Bildschirmfoto 2020-04-07 um 08.32.59.png

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 843 views
  • 0 likes
  • 3 in conversation