barryp, in addition to what Klaz2002 has said, I also observed if your target directory has another SAS file with .sd2 extension then the default is set to .sd2. If this is the case, even if you don't give any options it automatically outputs as .sd2 file. Check if that is the case in that one PC.
You are right it gives one record per key but what I want as output is not one record per newly generated key, what I am looking for is one record per id, questInd QuestOcc combination.
here is the code that I used-
Data Questions;
Set &outfile;
Key = Trim(ID) || SubStr(Quest,1,2) ||...
Thanks jymm,
This was very helpful.. I am almost there!
only thing is that it splits the record in two.
So this is what I am getting
questind questocc textOcc textInd
C2_1 abcd
C3_1 gggg
Any thoughts?
I have a dataset that has Id, Quest(these are the question no.) and some text for each of the question. I would like to transpose data so that certain combination of question and text would be per case.
Instead of explaining I will just give input and the desire output.
Input Dataset:
ID...
I have a form with many text boxes, the users either tab or by pressing enter key to move through each of the text boxes, once they enter the value in them. When they come to the last textbox(txtq28) to which they have to enter the value, I want
Once they enter the value in txtq28, and if...
Barryp,
klaz2002 has good suggestions.. couple more are
if you are running in batch mode,
using Endsas; statement executes your logic only upto that point.
if you do not want to execute the code which is in the middle of your program then create that portion into a dummy macro and not...
How about using %sysfunc()..
so the code would be
%let mth= %sysfunc(today(),month);
%let yr = %sysfunc(today(),year);
data file&mth.&yr.;
set infile;
run;
hth
SK1
that's it.. we don't have acc/odbc license but there is
SAS/ACC-OLE DB
thanks for all your help.. CSV could work but we wanted to automate the process from SAS so that the SAS programmers can run the SAS job and create an Access table from SAS. The
DBMS engine works well except for those two...
Thanks Klaz2002,
I had tried using Proc Export but it didn't work.. here is the error from the log using the Code you provided..
any thoughts? ( I have Access97 SAS 8.2)
1332 PROC EXPORT DATA= PROTO.FINAL
1333 OUTTABLE= "tblYNData"
1334...
I have to export SAS file into Access database. I am using DBMS engine to accomplish this. I have couple of quetions-
1. 1st one of the variables is char 255$ and it gives an error when I export this field. Length of 200$ works fine. But I would like to export out the full 255 $ field, is there...
How about using a Weekday function on AddmissionDate and see if it is 1,or 7 which is (Saturday or Sunday).. the code could be something like this.. I haven't tested the code though.....
data t;
set dsn.indst;
noofDays=intck('day',AdmissionDate,today());/**Get No. of Days**/
WorkingDays=0...
you can clean out the temporary SAS datasets by creating the same name, thus overwriting the previous existing one or once the dataset is no longer needed can use Stop Run statement :
data temp;/*Your temporary dataset*/
stop; run;
sometimes if your program is creating too many large...
I don't know the direct solution but you can reference two different libnames pointing at different locations..for example.
/*Location where your file are residing now*/
Libname origloc "D:\Files\Projects\Project1";
/*Destination where you want to send the file to*/
Libname destLoc...
First of all I would read both of the fileS into a sas temporary sas datasets. Give the unique fields(8 digits field) same name in both files let call it "Id". Then merge both the files by Id and say if in1 and in2 then the field at position 58(letsay you named it Field1), set it to...
Thanks, CJTYO for a response
"It will potentially mess up your spacing for printing the labels to actual label paper, but it will get text on the top of each page as you asked"- this is what exactly my problem is. Do you know how to over come this? thanks
I have a label report(for name and address), that needs to be printed on a plain paper(not label papers) for which I would like to include a title for ever page. How would I do this. I tried placing a label/textbox in page header in center but this messes up my report format. How do I print...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.