Sets the token delimiters for the FGET function.
Category: | External Files |
is a numeric variable that specifies the identifier that was assigned when the file was opened, generally by the FOPEN function.
is a character constant, variable, or expression that specifies one or more delimiters that separate items in the File Data Buffer (FDB). Each character listed is a delimiter. That is, if character is #@, either # or @ can separate items. Multiple consecutive delimiters, such as @#@, are treated as a single delimiter.
Default | blank |
specifies that the character delimiter is a hexadecimal value.
Restrictions | 'x' and 'X' are the only valid values for this argument. All other values will cause an error to occur. |
If you pass 'x' or 'X' as the third argument, a valid hexadecimal string must be passed as the second argument, character. Otherwise, the function will fail. A valid hexadecimal string is an even number of 0–9 and A–F characters. | |
Tip | If you use a macro statement, then quotation marks enclosing x or X are not required. |
John J. Doe,Male,25,Weight Lifter Pat O'Neal,Female,22,Gymnast
%let fid=%sysfunc(fopen(myfile)); %let rc=%sysfunc(fsep(&fid,%str(,))); %do %while(%sysfunc(fread(&fid)) = 0); %let rc=%sysfunc(fget(&fid,name)); %let rc=%sysfunc(fget(&fid,gender)); %let rc=%sysfunc(fget(&fid,age)); %let rc=%sysfunc(fget(&fid,work)); %put name=%bquote(&name) gender=&gender age=&age work=&work; %end; %let rc=%sysfunc(fclose(&fid));