[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: XPL questions



Carl Distefano wrote:
4) Execute the current CMline as FRAMENAME ARGUMENT?
That's what I'm trying to do. I wrote a couple of routines to automate tasks I do every day or at least a couple of times a week, which involve Changing Directories on my data drive to subdirs whose names are the current year, then creating or calling certain files whose names are based on dates. For example:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5,blotter}} PMG 3/10/06[cr|lf]{002}{<}SX01,{<}VA$DAyyyy{>}
{>}{<}SX02,{<}VA$DAyy{>}{>}{<}SX03,{<}VA$DAmm{>}{>}{<}SX04,{<
}VA$DAdd{>}{>}{<}SX05,{<}IS02{>}+{<}IS03{>}+{<}IS04{>}{>}[BC_
]cd e:\paper\blotter[XC_][BX_]exist e:{<}PV01{>}[Q2_]{<}IF{<}ER
{>}{>}{<}GLa{>}{<}EI{>} {<}GLb{>}{<}LBa{>}[BC_]mkdir e:{<}PV0
1{>}[XC_]{<}LBb{>}[BC_]cd e:{<}PV01{>}[XC_][BC_]ne e:{<}PV05{
{062}}pb.txt[XC_]{002}[cr|lf]
-nd
XPLeNCODE
(That needs some more work: too spaghetti-like with all those GLs, which should be Subroutines.) But then I thought to try to make it more universal, so that it might be of use to anyone else who used directories based on years, and file names based on dates. And for that, the top-level directory (or directories) would have to be entered by the user, not hard-coded. So I was envisioning a frame DATEFILE, which one would call with DATEFILE MYDir where MYDir would be the name of whatever directory on one's data drive one wanted, enterd at runtime.
I probably got too ambitious, but after reading Robert's PARSEFRM.DOc, I
was trying to do it as a routine that could be run from the CommandLine
(for debugging) and as a frame. But if the HELPKey is what stuffs the
argument into S/G 50, wouldn't one need some other method when running
it as a stand-alone program?
the convention we've adopted for U2 is that _arguments_are_passed_
> to_U2_frames_ via S/G 50
Yes, I did grasp that. What had me puzzled was HOW they got into S/G 50. Some routines include JM 2.PrsCMlineQ2, but others (notably TestPrs) don't. But if it's the HelpKey itself that does it... Well, duh! Of course. The Helpkey's definition in xy4.kbd is NOXHJM(,2,.,P,r,s,C,M,l,i,n,e,). Sorry. Sometimes the most obvious things are the things one misses. So if one is calling a frame with the HelpKey, one doesn't need to include JM 2.PrsCMlineQ2 in the actual frame, correct?

Patricia (I')M. Grovelling

Patricia M. Godfrey
priscamg@xxxxxxxx