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"...
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...
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...
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...
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...
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...
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...
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...
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;
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 +...
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...
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...
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...
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.