On 7/8/2016 10:50 AM, Stanislawski, Shawn (National VM Capability) wrote: > PEEK EXEC sets BOTH variable PEEK and NOTE , so I can't have both > PEEK / PROFPEEK and NOTE / PROFNOTE in the same converged file > using this single method.
You don't need to dig around in the caller at all. Each one uses its own name as the filetype. (The names are hardcoded, so you don't have to worry about RENAMEd or EXECLOADed copies, which I assume is why you weren't just looking at the name of the caller in the first place.) Most (but not DIRLIST) also put it in the argument after the options, and the oldest ones (NOTE, PEEK, FILELIST, RDRLIST) repeat it as the first word of the tokenized command. You can get it from your argument: Parse Arg fn ft fm '(' opts ')' exec tokenexec tokenopts and you could double- or triple-check FT against EXEC and TOKENEXEC as appropriate if you were super-picky. Or, if you want to accommodate being called without arguments by another profile, you could just get it from EXTRACT /FILETYPE/ . ¬R