We help IT Professionals succeed at work.

Old lotus macro

Marketing_Insists
on
495 Views
Last Modified: 2008-09-25

I've been asked to decipher a number of lotus macros authored in lotus 1-2-3

It's the standard joke.  The macros have been relied upon so long, that no one knows how
to generate the report without it. (and of course the original author is long gone and
didn't bother to document anything)

Here's a smattering of code.  Could someone tell me somthing about it?
Does it look like someone wrote it? or did someone just hit the record button?

I was told that it was written with a old version of Lotus 1-2-3 (v3.1),
but the file extensions are .wk4 's and run in Lotus 1-2-3 v5a




\0      {GOTO}AAA~{D 4}                              
      {APP-STATE "maximize"}                              
                                    
\G      {HOME}{GOTO}BBB~                              
      {PANELOFF}{WINDOWSOFF}                              
      /WGDOUDQ                              
      /FDg:\lad~                              
      /REC:C3.C:J599~                              
      /REB:A2.B:J4500~                              
      {GOTO}COUNTER3~                              
      1~                              
      {GOTO}COUNTER9~                              
      0~                              
      {GOTO}C6ENTRYA~                              
      +B:A2="LN"#OR#B:A2="BB"#OR#B:A2="BR"#OR#B:A2="LC"#OR#B:A2="SB"~                              
      {GOTO}C6ENTRY~                              
      @LEFT(B:C2,1)="0"#OR#@LEFT(B:C2,1)="1"#OR#@LEFT(B:C2,1)="7"#OR#@LEFT(B:C2,1)="9"~                              
      {GOTO}C:C3~                              
      /RNCTEMP9~~                              
      {GOTO}B:A2~                              
      {getlabel "INPUT AS OF DATE",FILE}                              
TEST      {LET d:A29,+"I:\015RPTS\sf"&FILE}                              
I:\015RPTS\sfTEST      /fccna3..i5000~{ESC}{ESC}{FULL}~                              
      {EDIT-GOTO "B:G2";;"RANGE"}                              
      /WIC~                              
      @IF(F2="AUD",1/H2,H2)~                              
      /C~.{END}{D}{L}{END}{U}{R}~                              
      /RV{END}{D}~{R}~                              
      /WDC~                              
      /WIC~                              
      @IF(F2="EUR",1/H2,H2)~                              
      /C~.{END}{D}{L}{END}{U}{R}~                              
      /RV{END}{D}~{R}~                              
      /WDC~                              
      /RFF5~{END}{D}~                              
      {EDIT-GOTO "B:D2";;"RANGE"}                              
      /WIC~                              

------------ snip ------------------
Comment
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Oh to answer your question - it was almost definitely written by hand. It would not be possible to put in the logical stuff by just recording a macro. It is possible to record a large part and then edit it but somehow I doubt that was how it was done.

By the way the following:

 +B:A2="LN"#OR#B:A2="BB"#OR#B:A2="BR"#OR#B:A2="LC"#OR#B:A2="SB"~     - sorry don't understand this line

It clear as to its logic but I don't understand what it is really doing. I think it's a problem of not knowing the context. The next line attempts to edit the line result of the line above if the B:A2 contains certain characters. The line is:

@LEFT(B:C2,1)="0"#OR#@LEFT(B:C2,1)="1"#OR#@LEFT(B:C2,1)="7"#OR#@LEFT(B:C2,1)="9"~

When extracted and run as mini macro these two lines don't appear to do very much. Try it and you'll see.

Now the line:

TEST     {LET d:A29,+"I:\015RPTS\sf"&FILE}

Is it quoted by you slightly ambiguously? I think you will find that TEST is a named range to the left of {LET d:A29,+"I:\015RPTS\sf"&FILE}. If it isn't then I don't know how it works!

Author

Commented:
Thanks!  I now have hope.

Though can you believe their is another 2000 lines of this?


Any way, your input gives me a nice head start
Many thanks for the points and the A grade.

Years ago I bought a very useful book on Lotus123 called "Using Lotus 123" published by Que in believe it or not 1985 -  I bought my copy almost exactly 21 years ago in 1987! Specifically it is ISBN 0-88022-243-3 and is written by Geoffrey T LeBlond and Douglas Ford Cobb. I reckon you might be able to find on Amazon for relatively little as it is so out of date or perhaps something a bit more up-to-date as the macro language changed as the newer editions of Lotus 123 became available.

2000 lines is a lot and very tiresome indeed.

I have no idea about your application but I would care to bet that if you re-thought it and put it into a database such as Lotus Approach which has acceptable reporting tools (considering how inexpensive it is) you might find the whole application much easier to re-implement.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.