I'm new to SAS and having a problem with my IF statement. I'm using SAS on the mainframe and coding in JCL. I've coded my statement like this:
IF YTD LT '.00' THEN
DFND = '1' AND CNTL = '2';
In other words, if the value of YTD is LT zero, I want to populate the variable DFND with a 1 AND the variable CNTL with a 2. I've tried many different ways of writing the statement, and I either get an error message or a message stating that the second variable (CNTL) was not initialized.
1. Can someone please tell me the correct why to write this IF statement, and
2. Can you recommend a good book/source for basic SAS programming on the mainframe?
I usually program in EzTrieve.
Thanks,
IF YTD LT '.00' THEN
DFND = '1' AND CNTL = '2';
In other words, if the value of YTD is LT zero, I want to populate the variable DFND with a 1 AND the variable CNTL with a 2. I've tried many different ways of writing the statement, and I either get an error message or a message stating that the second variable (CNTL) was not initialized.
1. Can someone please tell me the correct why to write this IF statement, and
2. Can you recommend a good book/source for basic SAS programming on the mainframe?
I usually program in EzTrieve.
Thanks,