/* --------------------------------------------------------------------
Code generated by a SAS task
Generated on Sunday, July 16, 2017 at 10:37:09 AM
By task: Import Data Wizard
Source file: xxx:\post_2017_Jul_15.txt
Server: Local File System
Output data: WORK.post_2017_Jul_151
Server:
Note: In preparation for running the following code, the Import
Data wizard has used internal routines to transfer the source data
file from the local file system to xxxxxxx. There is no SAS code
available to represent this action.
-------------------------------------------------------------------- */
DATA WORK.post_2017_Jul_151;
LENGTH
Category $ 14
SurName $ 6
First_Name $ 7
salary_1 8
salary_2 8
company $ 25
Profession $ 63
Year $ 45 ;
FORMAT
Category $CHAR14.
SurName $CHAR6.
First_Name $CHAR7.
salary_1 DOLLAR12.2
salary_2 DOLLAR7.2
company $CHAR25.
Profession $CHAR63.
Year $CHAR45. ;
INFORMAT
Category $CHAR14.
SurName $CHAR6.
First_Name $CHAR7.
salary_1 DOLLAR12.
salary_2 DOLLAR7.
company $CHAR25.
Profession $CHAR63.
Year $CHAR45. ;
INFILE 'T:\SASWork\_xxxxxxxxxxxx_\#LN00038'
LRECL=181
ENCODING="WLATIN1"
TERMSTR=CRLF
DLM='7F'x
MISSOVER
DSD ;
INPUT
Category : $CHAR14.
SurName : $CHAR6.
First_Name : $CHAR7.
salary_1 : ?? DOLLAR12.
salary_2 : ?? DOLLAR7.
company : $CHAR25.
Profession : $CHAR63.
Year : $CHAR45. ;
RUN;
Hi Jag, LinusH, Ballrdw, Thanks to each one of you. Please see the log attahced. Also attahced screenshots to show how I have imported. Hi Jag, Actually last three observations should not have a year, which is what I want. I think you have manually updated the txt file to a single space to get the correct answer (as the multiple professions were separated by tab instead you updated to a single space). However, my original file is having over million records, so I cannot update it to a single space manually. Could you help me.
... View more