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 TouchToneTommy 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: *

  • Users: SPhill
  • Content: Threads
  • Order by date
  1. SPhill

    Reading in unusual var names from csv

    Hello, I've got a problem with an input file which I've been asked to strip out some policy numbers. The problem arises with the first variable being called '!' i.e. !,polref *,1 *,2 *,3 *,4 *,5 PROC IMPORT OUT= WORK.exclam DATAFILE= "C:\Scott\PeskyExclamation.csv"...
  2. SPhill

    Proc Import giving "VAR1-VARn"

    Hello, I've been given a few CSV type files I need to read into SAS, normally I'd use Proc Import and have no problems however there's some extra lines in these CSV type files which seem to baffle proc import. Here's an example:- blah blah blah blah blah blah_blah, blah blah, blah...
  3. SPhill

    Assign filename in Proc Import

    Is there any way to assign your file name in proc import, it's easily done in an extra data step but I'd like to avoid the extra datastep if I can? Needless to say I'll have multiple file to import and assign individual names for var 'projclass' in this example. Thanks SP :- proc import...
  4. SPhill

    SAS and concatenated mixed data.

    I’ve got a problem, we’ve got a large number of datasets with different variables in different places which have been concatenated into one large dataset, what I need to do is read it all into a datastep and do a proc summary/tabulate etc. Normally I’d use something like this for reading in csv...
  5. SPhill

    Tricky array problem

    Hello, in my base table below I'm trying to create a rolling summary for unitt(i), by polref innref covref fund(i) The base array data is 'table 1' my output is 'table 2'. However with my code below I lose my rolling summary for fund2 due to it being set at fund1 on line 71 which gives obs 5 a...
  6. SPhill

    SAS and sum

    I'm trying to do something which should be simple but am having problems with, basically using the underneath table I need to sum my 'unitts' field so it will give me a sum by polref inrref covref funds so obs 5 will show '249.57'. PROC MEANS, PROC PRINT, with by statements work but I need the...
  7. SPhill

    Arrays

    Hello, I have some data in held in an array which I've managed to extract and it looks like this:- Obs inrref covref f1 f2 f3 unitt1 unitt2 unitt3 1 1 1 628 . . 725 0 0 2 2 1 . 629 . 0 565 0 3 3 1 . . 312 0 0 18...
  8. SPhill

    SAS and RETAIN

    Hello, I've been using retain to create a rolling summary of unit1 (see units1), what I need to do now is stop this rolling summary so I can use 'IF.LAST.covref' to give me lines I'm after i.e. obs8 obs16 obs23 obs30 (there are other variables but I can't fit them in here) to give me the sum of...
  9. SPhill

    Blank Lines

    Anyone know how to eliminate the top two blank rows that ODS CSV creates? Thanks Scott(SAS8.2 TSO JCL MVS) My code below:- ods CSV body=CSV style=minimal rs=none; *; proc print; run; ods CSV close;
  10. SPhill

    CSV Titles

    I'm using 'put (_all_)(',');' to export all variables into a CSV file, however I need to put column headers in the file as well. I'm holding about 200 columns of data from a previously defined macro:- " %MACRO INPUTCD ; %DO I=1 %TO 200; @1391 +...
  11. SPhill

    Network CSV files to mainframe

    I'm using SAS 8.2 on MVS mainframe using JCL and I'd like to read in some CSV files directly from a network we have here in work. I could copy the files into our mainframe but this would be a bit messy and time consuming and I'm wondering if there is a way of directing my DSN in the JCL directly...
  12. SPhill

    Txt file to Pivot Table

    Has anyone got a solution for this, my pivot Table is rounding numbers from a txt file: Should look like this (from Access table into Piv Table) PROJCLAS NCNTTWO UBONSU 1 UBONSU 0.442 UBONSU 1 UBONSU 0.392 UBONSU 1 But looks like this in Piv table (from txt file into PT) PROJCLAS...
  13. SPhill

    SAS INPUT STATEMENT

    I'm using version 6.09 mainframe SAS and recently had a request to read a CSV file type for testing in SAS. Has anyone got any 'INPUT' statements that would work on this version for a dataset which contains comma seperated values? My input @ statments for fixed width datasets can't be used on...

Part and Inventory Search

Back
Top