12-03-2010 03:51 AM
12-03-2010 04:05 AM
12-03-2010 05:03 AM
12-03-2010 07:48 AM
08-25-2014 03:34 AM
is there any possibility of reading x value 9 and y value missing here.
with missover option: compatability issues
with truncover option ; inifinite loop
with shorter records in input, we are able use missover and getting the results. I need the same kind of option in this case.
infile datalines truncover;
input X Y @@ ;
1 2 5 7 9
08-25-2014 08:55 AM
Double trailing @@ and MISSOVER are incomparable INFILE statement options.
If you want this to work as I think you do you can add a . for the missing value or use EOF option to resolve the LOSTCARD.
05-25-2015 05:35 AM
Hi John @
Can you please explain why this is failing and the fix when the data has many records. I understand EOF will fail the first time and flow over default behaviour takes effect.
/* Not properly executing*/
infile datalines eof=eof;
input X Y @@ ;
1 2 5 7 9
2 3 4 5 6
By the way, I have begin to read and understand(try) each and every post of yours in communities here, but i am unable to do an easy seach to all your posts on SAS -L. I'd appreciate if you could share.
05-25-2015 07:41 AM
It depends on what is "correct". What do you expect the result should be. The program pairs 9 from line 1 and 2 from line 2. and "incorrectly" outputs missing for both X and Y when everything is Paried.
Perhaps this is more correct.
On SAS-L I've used two different gmail ids datanull and iebupdte.
05-25-2015 08:59 AM
Hi, Thank you again. This expected result is to take the missing value without having to jump to the next line and read 2 pairing with 9 to complete a full pair in each observation. Desired results:
and so on please.
the latest program results of yours is:
9 2 /* to be corrected
05-25-2015 09:21 AM
Long time no see . What is up to you now ?
@@ can't do that . You need a special technique : truncover + do while() .
data pairs; infile datalines truncover; input X Y @; do while (X ne . or Y ne .) ; output; input X Y @; end; datalines; 1 2 5 7 9 2 3 4 5 6 ;;;; run;
05-25-2015 10:13 AM
Hi Xia, Thank you so much for the courtesy and that's very kind of you. I took some time off as it has begun to get sunny and warmer, so went for a nice sunny holiday in Southern Europe. Well, got burnt though I only got back to work this week. Thanks as always and ever for all your help. I will never ever forget each one and will always value them, I promise!. I have just started learning SAS seriously and of course I would reach out to you here or offline directly every-time I run into some emergency needing your help when it matters at work.
Thanks for the solution Xia. I remember you telling me you were starting to get busy. Well, in that case I will only bother you for help during the weekends or late evenings at your convenience .
I hope you are doing well and all's well in Beijing.