Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

variables in SAS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: variables in SAS
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: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 08, 2008 3:05 pm    Post subject:
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    Post subject: Reply to: variables in SAS
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: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 08, 2008 3:17 pm    Post subject:
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    Post subject: Reply to: variables in SAS
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us