BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
theriff29
Calcite | Level 5

Hi Kurt, 

I see you are online.

I am in need of  a breakthrough here for something I am working on urgently... I am trying to extract the YYYY form the the title of each text file and add that value to the variable year as seen in my code below..... I have over 200 text files with the titles format yobYYYY as titles e.g. yob1880.txt.......yob2010.txt.. yob2019.txt  and the value I am interested is the YYYY value to import them into my data set accordingly. 

 

This is my code so far, I have been able to create the data set with the dummy variable year so even though it show just a dot in the value ,  good result so far but still trying to figure out how to add the YYYY extracted from each text file title accordingly.. 

 

/* *
Creating the data set for the Predictive Analysis of Popularity of baby names in the USA

SAS Version 9.4

**/

title 'Baby Names in the USA since 1880'; /* Title of the Dataset */

filename pwd 'C:\Users\Roger\Desktop\BabyNames'; /* Directory where the text files are stored*/

/* Create the Baby Names dataset */
data babyNames;

/* ... using input from all the text files which have a delimiter , to split the fields*/
infile pwd(*.txt) DLM=',';

/* ... creating the following input variables to store the data*/
input
year = 1880 /* this is the attribute where I want to add the value of the text file title i.e. YYYY from yobYYYY title*/
name $ /* category, baby name */
sex $ /* category, gender of baby */
number /* number of times this name was given in that year'*/
;
label
year = 'Year of Birth'
name = 'Name'
sex = 'Gender'
number = 'Occurences'
;
run;

/*Print the first 500 observations to see if the data loaded properly */
proc print
data=babyNames ;
label;
(obs = 500);
run;

/* *
   Creating the data set for the Predictive Analysis of Popularity of baby names in the USA

   SAS Version 9.4

**/

title 'Baby Names in the USA since 1880'; /* Title of the Dataset */

filename pwd 'C:\Users\Roger\Desktop\BabyNames'; /* Directory where the text files are stored*/

/* Create the Baby Names dataset */
data babyNames;

	/* ... using input from all the text files which have a delimiter , to split the fields*/
	infile pwd(*.txt) DLM=',';

	/* ... creating the following input variables to store the data*/
	input
        year = 1880 /* this is the attribute where I want to add the value of the text file title i.e. YYYY from yobYYYY title*/
		name $      /* category, baby name */
		sex $       /* category, gender of baby */
        number      /* number of times this name was given in that year'*/
		;
	label
	    year = 'Year of Birth'
		name = 'Name'
        sex = 'Gender'
		number = 'Occurences'
	;
run;

/*Print the first 500 observations to see if the data loaded properly */
proc print 
	data=babyNames ;
    label;
	(obs = 500);
run;
1 ACCEPTED SOLUTION
6 REPLIES 6
Kurt_Bremser
Super User

Use the filename= option in your infile statement to retrieve the name of the file that is currently read.

data babyNames;
length
  fname $200
  /* set length of other variables as needed, or they will default to 8 */
;
/* ... using input from all the text files which have a delimiter , to split the fields*/
infile pwd(*.txt) DLM=',' filename=fname;

/* after the input */
year = input(substr(scan(scan(fname,-1,'\'),1,'.'),4,4),4.);
theriff29
Calcite | Level 5
 

I am not sure if I am doing something wrong, newbie in SAS coding...

The year field is still giving a . on the table output, still not able to not to extract it......

anything I missed in the code ? See above

This is a sample of a dataset among then other attached......the title are always yobYYYY.txt

 
/* *
   Creating the data set for the Predictive Analysis of Popularity of baby names in the USA

   SAS Version 9.4

**/

title 'Baby Names in the USA since 1880'; /* Title of the Dataset */

filename pwd 'C:\Users\Roger\Desktop\BabyNames'; /* Directory where the data is stored*/

/* Create the Baby Names dataset */
data babyNames;

/* set length of other variables as needed, or they will default to 8 */
length
  fname $200
  year 
  name  $15
  sex   $1
  number 30  
;
/* ... using input from all the text files which have a delimiter , to split the fields*/
infile pwd(*.txt) DLM=',' filename=fname;


	/* ... creating the following input variables to store the data*/
	input
        year = input(substr(scan(scan(fname,-1,'\'),1,'.'),4,4),4.) /* this is the attribute where I want to add the value of the text file title i.e. YYYY from yobYYYY title*/
		name        /* category, baby name */
		sex         /* category, gender of baby */
        number      /* number of times this name was given in that year*/
		;
    
	label
	    year = 'Year of Birth'
		name = 'Name'
        sex = 'Gender'
		number = 'Number of occurrences of the name'
	;



run;

/* Print the first 1000 observations to see if the data loaded properly */
proc print 
	data=babyNames  /* data set*/
    (obs = 1000)     /* Only Print the first 100 obs*/
    label;          /* Print with given labels*/
	
run;


I am not sure if I am doing something wrong, newbie in SAS coding...

The year field is still giving a . on the table output, still not able to not to extract it......

anything I missed in the code ? See above

This is a sample of a dataset among then other attached......the title are always yobYYYY.txt

Kurt_Bremser
Super User

The calculation of year has to come after the whole input statement, not immediately after the input keyword.

input
  name        /* category, baby name */
  sex         /* category, gender of baby */
  number      /* number of times this name was given in that year*/
;
year = input(substr(scan(scan(fname,-1,'\'),1,'.'),4,4),4.);

Please post the log if you have further problems (copy/paste into {i} subwindow).

theriff29
Calcite | Level 5

Hi Kurt, 

No luck yet....

The function year = input(substr(scan(scan(fname,-1,'\'),1,'.'),4,4),4.); doesn't even show as coloured in my SAS code , could it be the version I am using SAS 9.4

 

the text file tile format is yobYYYY.txt and the value I am trying to extract is only YYYY to add into the year column respectively.

See code below , log output  and output resultes attached 

 

/* *
   Creating the data set for the Predictive Analysis of Popularity of baby names in the USA

   SAS Version 9.4

**/

title 'Baby Names in the USA since 1880'; /* Title of the Dataset */

filename pwd 'C:\Users\Roger\Desktop\BabyNames'; /* Directory where the data is stored*/

/* Create the Baby Names dataset */
data babyNames;

/* set length of other variables as needed, or they will default to 8 */
/*length
  fname $200
  name  $15
  sex   $1
  number   
;
/* ... using input from all the text files which have a delimiter , to split the fields*/
infile pwd(*.txt) DLM=',' filename=fname;


	/* ... creating the following input variables to store the data*/
	input 
		name  $      /* category, baby name */
		sex   $      /* category, gender of baby */
        number      /* number of times this name was given in that year*/
	;

   year = input(substr(scan(scan(fname,-1,'\'),1,'.'),4,4),4.); /* Input of year value into year attribute*/

	label
	    year = 'Year of Birth'
		name = 'Name'
        sex = 'Gender'
		number = 'Number of occurrences of the name'
	;



run;

/* Print the first 1000 observations to see if the data loaded properly */
proc print 
	data=babyNames  /* data set*/
    (obs = 1000)     /* Only Print the first 1000 obs*/
    label;          /* Print with given labels*/
	
run;
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
      Licensed to DE MONTFORT UNIVERSITY, Site 51200470.
NOTE: This session is executing on the X64_8PRO  platform.



NOTE: Updated analytical products:

      SAS/STAT 14.1
      SAS/ETS 14.1
      SAS/IML 14.1
      SAS/QC 14.1

NOTE: Additional host information:

 X64_8PRO WIN 6.2.9200  Workstation

NOTE: SAS initialization used:
      real time           1.34 seconds
      cpu time            0.62 seconds

1    /* *
2       Creating the data set for the Predictive Analysis of Popularity of baby names in the
2  ! USA
3
4       SAS Version 9.4
5
6    **/
7
8    title 'Baby Names in the USA since 1880'; /* Title of the Dataset */
9
10   filename pwd 'C:\Users\Roger\Desktop\BabyNames'; /* Directory where the data is stored*/
11
12   /* Create the Baby Names dataset */
13   data babyNames;
14
15   /* set length of other variables as needed, or they will default to 8 */
16   /*length
17     fname $200
18     name  $15
19     sex   $1
20     number
21   ;
22   /* ... using input from all the text files which have a delimiter , to split the fields*/
23   infile pwd(*.txt) DLM=',' filename=fname;
24
25
26       /* ... creating the following input variables to store the data*/
27       input
28           name  $      /* category, baby name */
29           sex   $      /* category, gender of baby */
30           number      /* number of times this name was given in that year*/
31       ;
32
33      year = input(substr(scan(scan(fname,-1,'\'),1,'.'),4,4),4.); /* Input of year value
33 ! into year attribute*/
34
35       label
36           year = 'Year of Birth'
37           name = 'Name'
38           sex = 'Gender'
39           number = 'Number of occurrences of the name'
40       ;
41
42
43
44   run;

NOTE: The infile library PWD is:
      Directory=C:\Users\Roger\Desktop\BabyNames

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1880.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+
1         Mary,F,7065 11
fname=C:\Users name=Mary sex=F number=7065 year=. _ERROR_=1 _N_=1
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
2         Anna,F,2604 11
fname=C:\Users name=Anna sex=F number=2604 year=. _ERROR_=1 _N_=2
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
3         Emma,F,2003 11
fname=C:\Users name=Emma sex=F number=2003 year=. _ERROR_=1 _N_=3
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
4         Elizabeth,F,1939 16
fname=C:\Users name=Elizabet sex=F number=1939 year=. _ERROR_=1 _N_=4
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
5         Minnie,F,1746 13
fname=C:\Users name=Minnie sex=F number=1746 year=. _ERROR_=1 _N_=5
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
6         Margaret,F,1578 15
fname=C:\Users name=Margaret sex=F number=1578 year=. _ERROR_=1 _N_=6
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
7         Ida,F,1472 10
fname=C:\Users name=Ida sex=F number=1472 year=. _ERROR_=1 _N_=7
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
8         Alice,F,1414 12
fname=C:\Users name=Alice sex=F number=1414 year=. _ERROR_=1 _N_=8
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
9         Bertha,F,1320 13
fname=C:\Users name=Bertha sex=F number=1320 year=. _ERROR_=1 _N_=9
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
10        Sarah,F,1288 12
fname=C:\Users name=Sarah sex=F number=1288 year=. _ERROR_=1 _N_=10
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
11        Annie,F,1258 12
fname=C:\Users name=Annie sex=F number=1258 year=. _ERROR_=1 _N_=11
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
12        Clara,F,1226 12
fname=C:\Users name=Clara sex=F number=1226 year=. _ERROR_=1 _N_=12
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
13        Ella,F,1156 11
fname=C:\Users name=Ella sex=F number=1156 year=. _ERROR_=1 _N_=13
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
14        Florence,F,1063 15
fname=C:\Users name=Florence sex=F number=1063 year=. _ERROR_=1 _N_=14
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
15        Cora,F,1045 11
fname=C:\Users name=Cora sex=F number=1045 year=. _ERROR_=1 _N_=15
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
16        Martha,F,1040 13
fname=C:\Users name=Martha sex=F number=1040 year=. _ERROR_=1 _N_=16
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
17        Laura,F,1012 12
fname=C:\Users name=Laura sex=F number=1012 year=. _ERROR_=1 _N_=17
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
18        Nellie,F,995 12
fname=C:\Users name=Nellie sex=F number=995 year=. _ERROR_=1 _N_=18
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
19        Grace,F,982 11
fname=C:\Users name=Grace sex=F number=982 year=. _ERROR_=1 _N_=19
NOTE: Invalid third argument to function SUBSTR at line 33 column 17.
NOTE: Invalid argument to function INPUT at line 33 column 11.
WARNING: Limit set by ERRORS= option reached.  Further errors of this type will not be printed.
20        Carrie,F,949 12
fname=C:\Users name=Carrie sex=F number=949 year=. _ERROR_=1 _N_=20
NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1881.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1882.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1883.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1884.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1885.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1886.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1887.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1888.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1889.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1890.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1891.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1892.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1893.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1894.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1895.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1896.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1897.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1898.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1899.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1900.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1901.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1902.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1903.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1904.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1905.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1906.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1907.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1908.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1909.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1910.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1911.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1912.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1913.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1914.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1915.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1916.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1917.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1918.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1919.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1920.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1921.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1922.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1923.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1924.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1925.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1926.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1927.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1928.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1929.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1930.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1931.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1932.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1933.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1934.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1935.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1936.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1937.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1938.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1939.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1940.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1941.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1942.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1943.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1944.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1945.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1946.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1947.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1948.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1949.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1950.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1951.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1952.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1953.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1954.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1955.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1956.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1957.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1958.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1959.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1960.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1961.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1962.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1963.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1964.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1965.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1966.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1967.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1968.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1969.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1970.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1971.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1972.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1973.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1974.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1975.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1976.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1977.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1978.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1979.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1980.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1981.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1982.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1983.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1984.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1985.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1986.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1987.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1988.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1989.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1990.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1991.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1992.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1993.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1994.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1995.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1996.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1997.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1998.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob1999.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2000.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2001.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2002.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2003.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2004.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2005.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2006.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2007.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2008.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2009.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2010.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2011.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2012.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2013.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2014.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2015.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2016.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2017.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: The infile PWD(*.txt) is:
      Filename=C:\Users\Roger\Desktop\BabyNames\yob2018.txt,
      File List=C:\Users\Roger\Desktop\BabyNames\*.txt,
      RECFM=V,LRECL=32767

NOTE: A total of 1957046 records were read from the infile library PWD.
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 2000 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 1935 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2127 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2084 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2297 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2294 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2392 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2373 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2651 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2590 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2695 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2660 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2921 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 2831 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 2941 records were read from the infile PWD(*.txt).
      The minimum record length was 7.
      The maximum record length was 16.
NOTE: 3049 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 3091 records were read from the infile PWD(*.txt).
      The minimum record length was 7.
      The maximum record length was 16.
NOTE: 3028 records were read from the infile PWD(*.txt).
      The minimum record length was 7.
      The maximum record length was 16.
NOTE: 3264 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 3042 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 3730 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 3153 records were read from the infile PWD(*.txt).
      The minimum record length was 7.
      The maximum record length was 16.
NOTE: 3362 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 3389 records were read from the infile PWD(*.txt).
      The minimum record length was 7.
      The maximum record length was 16.
NOTE: 3560 records were read from the infile PWD(*.txt).
      The minimum record length was 7.
      The maximum record length was 16.
NOTE: 3655 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 16.
NOTE: 3633 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 3948 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 4018 records were read from the infile PWD(*.txt).
      The minimum record length was 7.
      The maximum record length was 16.
NOTE: 4227 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 4629 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 4867 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 6351 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 6968 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 7965 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9357 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 9696 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 9913 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10398 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10369 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10756 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 10857 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 10756 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10643 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10869 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 10638 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 10458 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 10406 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 10159 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9820 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9791 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9298 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9381 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9013 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9180 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9037 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 8894 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 8946 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9032 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 8918 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 8961 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9085 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9425 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9408 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 17.
NOTE: 9152 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 9025 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 9705 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10371 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10241 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10269 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10303 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10462 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10646 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10837 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 10968 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 11115 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 11340 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 11564 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 18.
NOTE: 11522 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 11767 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 11921 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 12182 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 12209 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 12282 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 12397 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 11952 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 12151 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 12397 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 12936 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 13749 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 14779 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 15295 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 15412 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 15682 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 16249 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 16944 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 17391 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 18175 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 18231 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 19039 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 19452 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 19475 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 19694 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 19407 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 19506 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 20085 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 20657 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 21406 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 22367 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 23775 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 24716 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 25109 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 25427 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 25966 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 25997 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 26080 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 26423 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 26970 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 27902 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 28552 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 29772 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 20.
NOTE: 30274 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 30564 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 31185 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 32048 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 32549 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 34088 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 34961 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 35079 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 34709 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 34073 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 33908 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 33747 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 33282 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 33243 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 33121 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 33010 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 32590 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: 32033 records were read from the infile PWD(*.txt).
      The minimum record length was 6.
      The maximum record length was 19.
NOTE: Mathematical operations could not be performed at the following places. The results of
      the operations have been set to missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      1957046 at 33:11
NOTE: The data set WORK.BABYNAMES has 1957046 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           2.45 seconds
      cpu time            2.20 seconds


45
46   /* Print the first 1000 observations to see if the data loaded properly */
47   proc print
NOTE: Writing HTML Body file: sashtml.htm
48       data=babyNames  /* data set*/
49       (obs = 1000)     /* Only Print the first 1000 obs*/
50       label;          /* Print with given labels*/
51
52   run;

NOTE: There were 1000 observations read from the data set WORK.BABYNAMES.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.53 seconds
      cpu time            0.40 seconds


 

theriff29
Calcite | Level 5

Hi Kurt,

Just to thank you once again on your solution , really appreciate it. I managed to import the data into SAS

My apologies for discarding/commenting the length statement , didn't understand the importance of it, I thought SAS was predisposed to import the value regardless of the length.... I get it now it sets it at 8 characters unless you assign the appropriate length yourself.... still on a learning curve.

 

Thank you again....... This is the final code for the next person who will be in the same kind of situation.

 

/* *
   Creating the data set for the Predictive Analysis of Popularity of baby names in the USA

   SAS Version 9.4

**/

title 'Baby Names in the USA since 1880'; /* Title of the Dataset */

filename pwd 'C:\Users\Roger\Desktop\BabyNames'; /* Directory where the data is stored*/

/* Create the Baby Names dataset */
data babyNames;

/* set length of other variables as needed, or they will default to 8 */
 length fname  $200;
 length  name  $41 ;
 length  sex   $1 ;
;
/* ... using input from all the text files which have a delimiter , to split the fields*/
infile pwd(*.txt) DLM=',' filename=fname;


	/* ... creating the following input variables to store the data*/
	input 
		name  $      /* category, baby name */
		sex   $      /* category, gender of baby */
        number      /* number of times this name was given in that year*/
	;

   year = input(substr(scan(scan(fname,-1,'\'),1,'.'),4,4),4.); /* Input of year value into year attribute*/

	label
	    year = 'Year of Birth'
		name = 'Name'
        sex = 'Gender'
		number = 'Number of occurrences of the name'
	;



run;

/* Print the first 1000 observations to see if the data loaded properly */
proc print 
	data=babyNames  /* data set*/
    (obs = 1000)     /* Only Print the first 1000 obs*/
    label;          /* Print with given labels*/
	
run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1900 views
  • 0 likes
  • 2 in conversation