Knowing nothing of the structure of the incoming file, it is a bit hard to give a definitive response. Generally in flat files the INFORMAT is used to read date form data into SAS dates. The family of ANYDT informats is the most flexible when the column is not constant, but there are many others. For the two that you mentioned look at YYMMN and YYMMDD .
If I understand you correctly, you want to take the strings for MONTH and YEAR out of the &FILENAME macro variable and from those strings you want to create &DATAMON and &CURRMON??? Is that correct?
&FILENAME resolves to S:\Per\IMS\SAS\INFILES\Jan 2010 ZUD.txt
from &FILENAME, &DATAMON would resolve to 201001 (a text string) and
&CURRMON would resolve to 2010-01-01 (a text string, where the day is always 01)
I wonder because you said you wanted to take "values from the file" and not from the &FILENAME macro variable. Can you clarify?
If you are macro language challenged (with using %SYSFUNC and associated SAS CALL functions), then you could run a SAS DATA step using the macro variable string &FILENAME, parse it using SUBSTR(...) and then use the PUT(...) function with the desired output format. The last statement would be CALL SYMPUT functions to generate your new SAS macro variables.
Otherwise, using SAS macro language, you can use %SUBSTR(...) to parse your macro variable, then use %SYSFUNC(...) to translate the month-year data-string, first to a SAS DATE variable, then back to a SAS output-format string and macro variables, as needed.
Suggest you take the challenge one step at a time to get the data-string parsed, then converted to a SAS DATE, then re-formatted to your macro variables in the format needed.
You can also do this without using a DATA step program because %SYSFUNC allows you to invoke any of the other functions you need. See the SAS log below. I did intermediate %PUT statements to illustrate what macro variables were being created. Certainly, in a production system, some of the %LET statements are not needed and the %PUT statements are not needed. They are just there for illustration purposes.