IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

variables in SAS


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Fri Aug 08, 2008 11:51 am
Reply with quote

Hi,

I have two files. I need to compare date variables of these two files. When i declared two variables for two files and when compared the dates... the data in the first datastep is having value but when it comes to another datstep it is showing .(missing value).

Iam new to SAS, please help me......
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 08, 2008 3:05 pm
Reply with quote

The missing value in SAS (period) means that the numeric variable did not have a number read in the position(s) you specified. Please post the SAS code and the error messages in the SASLOG for more help.
Back to top
View user's profile Send private message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Fri Aug 08, 2008 3:12 pm
Reply with quote

DATA PARM_CARD;
RETAIN CYC_DT_X 0;
INFILE PRMCARD;
INPUT @1 CYC_DT $8.;
CYC_DT_X = INPUT(CYC_DT,MMDDYY8.);
FORMAT CYC_DT_X MMDDYY10.;
DATA REIN_ACDC;
INFILE REINACDC EOF=TOTALS;
INPUT @42 RIN_SYSDT PD4.;
PUT 'CYC_DT_X :- ' CYC_DT_X;
SYS_DT = DATEJUL(RIN_SYSDT);
FORMAT SYS_DT MMDDYY10.;
RUNNUM = 'JRN200';
COUNT + 1;
IF SYS_DT = CYC_DT_X THEN DO;
COUNTR + 1;
END;
GO TO BOTTOM;
TOTALS:
FILE SASREPT;

in the SAS log..it is displaying the values as:
CYC_DT_X :- .
CYC_DT_X :- .
CYC_DT_X :- .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 08, 2008 3:17 pm
Reply with quote

It will always say that ... you've got a DATA step followed by a DATA step. Unless you link the two, the data read in the second step has no relationship to the data read in the first step. From your code, what I think you need to do is:
Code:
DATA REIN_ACDC;
IF _N_ = 1 THEN SET PARM_CARD;
RETAIN CYC_DT_X;
INFILE REINACDC EOF=TOTALS;
instead of
Code:
DATA REIN_ACDC;
INFILE REINACDC EOF=TOTALS;
Back to top
View user's profile Send private message
vasantha

New User


Joined: 05 Aug 2008
Posts: 16
Location: hyderabad

PostPosted: Fri Aug 08, 2008 3:26 pm
Reply with quote

Thank you so much now iam able to get the correct O/P....
Thanks a lot..............At last i have successfully finished one SAS program
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
No new posts reset/clear ALL application profile v... TSO/ISPF 3
No new posts REXX - Adding variables CLIST & REXX 8
No new posts using based or defined variables PL/I & Assembler 2
Search our Forums:

Back to Top