Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ChrisW75

    Undetermined I/O failure

    SAS isn't so good at resolving external errors. Could be lack of disk space, could be network connectivity glitches. I've found in the past that if this keeps happening, it's worth working on your local disk, then copying the data across using file system tools (ie doing it through your OS or a...
  2. ChrisW75

    SAS help

    Worth checking out Proc Compare. I've used it a couple of times to check and it's a little unwieldy, but can simply compare ever value in ever record between the 2 datasets. Chris. Chris Business Analyst, Code Monkey, Data Wrangler. SAS Guru.
  3. ChrisW75

    Need help in SAS code

    What are you actually trying to do? Your If... then.. construction seems wrong, looks more like a CASE statement construction from SQL. Chris. Chris Business Analyst, Code Monkey, Data Wrangler. SAS Guru.
  4. ChrisW75

    Suppress leading zero in a date in sas

    I haven't done this in a long time, however, it's worth looking at Picture Formats in the documentation. IT contains full instructions on how to create your own format. You should be able to construct a format for your date which does what you need. If you have trouble, post back and I'll see...
  5. ChrisW75

    Import fixed format data into SAS dataset - with error

    Have you looked at the source file using a text editor that can show hex? I've had problems like this in the past where an "empty" record actually has an end of file character (Hex value 1A). In fact, I think mine was embedded in a text field. (end of file is also CTRL+Z so I suspect that it was...
  6. ChrisW75

    Simple Proc Tabulate problem

    How would this look:- PROC TABULATE DATA=AODADNLD FORMAT=COMMA10. TITLE 'TESTING CLIENT CHARACTERISTICS'; CLASS RPUNITCD CLTCHAR; TABLE RPUNITCD*CLTCHAR, N; RUN; What is "Midnme"? IT's not mentioned in your code... Chris Business Analyst, Code Monkey...
  7. ChrisW75

    Export summary tables to excel

    Try XML, that might work, Excel can read XML. What is SAS actually running on? Are you remote submitting code to a Unix system via EG? You should just be able to right click on the data, select "Send To" and then "Microsoft Excel". If you can't do that, then it's likely your SAS Server...
  8. ChrisW75

    Divide one column by another in SAS Enterprise Guide

    I intitially wrote that you'd need to do it in 2 steps however you can do it in 1. create a new query on the start dataset, select the columns you want summed and in the summary column change "None" to "SUM". Then click on the computed columns button > New > Build Expression... When it asks...
  9. ChrisW75

    SAS AF / SCL

    Sorry, I've not done any work with SAS/AF. You might want to try the L-SAS forum, there's at least 1 guy there who knows SAS/AF. I remember him well as he was a complete a55hat. He does however seem to have an in depth knowledge of SAS/AF. Good luck. Chris Business Analyst, Code Monkey...
  10. ChrisW75

    Sum of rows

    Alternatively to keep this in native SAS:- proc summary data=dset nway; class ID; var x; output out=new_dset(drop=_type_) sum=; run; Chris Business Analyst, Code Monkey, Data Wrangler. SAS Guru.
  11. ChrisW75

    array reference in title statement?

    Not that I'm aware of. The only thing I could think of is to right the value to a macro variable, then use that in the title. Chris Business Analyst, Code Monkey, Data Wrangler. SAS Guru.
  12. ChrisW75

    Macro variable resolution order

    Hi Asender, The problem here is the SCOPE of the macro variable. Macro variables by default are local in scope, they will exist within the current macro, but not outside it. Insert this line:- %GLOBAL EMAIL; At the start of your program and it'll work just fine after that. I'd recommend...
  13. ChrisW75

    deleting part of the string

    Just realised there is a line of code missing fromt he end of my code snippet there. You'll also want else remainder = some_string; otherwise it'll be empty if there's no parentheses in your original text string. :) Chris Business Analyst, Code Monkey, Data Wrangler. SAS Guru.
  14. ChrisW75

    Process episode data with dates when a by variable change

    try this. proc sort data=a; by id fac start_dt start_tm stop_tm; run; data b(drop=start_tm start_dt); set a; by id fac; retain start_date start_time; if first.fac then do; start_date = start_dt; start_time = start_tm; end; if last.fac then do; stop_date =...
  15. ChrisW75

    deleting part of the string

    Ooooh, I did something like this a while ago to remove strings inside parentheses from the middle of a bigger string. You obviously don't need this as Dave's method worked for you, but for completeness (and I like showing off my code) here's my method. if indexc(some_string,'(') > 0 and...
  16. ChrisW75

    how do I FTP then Email in SAS

    That first bit doesn't look like regular SAS code to me, what is that? Have you tried putting the FTP part after the e-mail part? Chris Business Analyst, Code Monkey, Data Wrangler. SAS Guru.
  17. ChrisW75

    SAS chaning char variables to date

    Hi Lulumohca, this was a fun little brain teaser. I've got it I think pretty much all the way there, but I'm not sure of exactly what date you want returned. Tyr running the code below and have a play with the results to tweak it to fit your requirements. I've made an assumption concerning...
  18. ChrisW75

    Reading Character-Delimited Files That Contain New-Line Characters

    Hi Apoc, This is a problem you'll no doubt stumble over many times, it's a problem that's plagued me for years. As far as I can tell, there's no way to overcome this in SAS. My method for dealing with this is to use a smart text editor (such as VEdit) to strip these characters out. Generally...
  19. ChrisW75

    Using date window counters

    Fair enough. You know, if you had another variable on the dataset which linked the groups (ie was common for the first 3 values, then for the second 3 etc), the answer to this would be trivial. I'll admit I'm having trouble following what your code is doing, I'm not big on arrays and creative...
  20. ChrisW75

    Assign Encoded Password To Macro Variable

    There's an example of how to do this on the documentation for PWENCODE. Looks like you have to write it out to a file, then read that file in and put the read in data into a macro variable. filename pwfile 'external-filename'; options symbolgen; data _null_; infile pwfile obs=1 length=l...

Part and Inventory Search

Back
Top