What you posted earlier is what you think is in the dataset, not what is in the file. Open the file with a text editor and copy a few lines into a code box. I will not repeat this a third time.
If you don't have access to it, you can't read it. If you can read it from SAS, you can download it to your desktop, either with SAS Studio or the Copy Files task in Enterprise Guide.
BTW your data as posted has three columns, while this code will create only one.
@Pandu2 wrote:
I posted the data which has one column and I need the final dataset which should have 3 columns
Please show how in your original post of :
I've a temp dataset whose structure is like below
sno name.
1 "Xyz":"123"
2 "gef":"abc23"
3 "rod":"124899"
4. "Xyz":"567"
5. "gef":"ijk67"
6. "rod":"800775"
is "one column".
That post implies 2 "columns". You explicitly labeled them as SNO and NAME.
@Pandu2 wrote:
Sure,
Data work.want
Infile srct dad lrecl=30000000 dlm ='[{}}';
Input js : $2000.@@;
do i =1 to countw(js, ' , ');
name =scan(js,i, ' , ');
Output;
end;
drop js i ;
run;
So, it creates a temp dataset and has multiple observations but I kept few only. Please have a look at the data which I posted above.
This is the most useful posting you have made in this thread. From these we can see a lot of the information you have not been explaining before.
Use a simple DATA step to dump a couple of lines from the file into the SAS log.
data _null_;
infile srct obs=3;
input;
list;
run;
If the lines in the file are really 3Million bytes long then you might not what to list more than 1 of them. You might want to just list the first few hundred bytes from the file instead.
data _null_;
infile srct obs=5 recfm=f lrecl=100;
input;
list;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.