Old lotus macro

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~                              
      {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"}                              
      {EDIT-GOTO "B:D2";;"RANGE"}                              

------------ snip ------------------
Who is Participating?
patrickabConnect With a Mentor Commented:
\0                                           This is an automacro that executes when the file is opened
\0     {GOTO}AAA~{D 4}           Go to named range AAA and the move down 5 cells          
     {APP-STATE "maximize"}     Maximise the window for the applicaton                  
\G     {HOME}{GOTO}BBB~               Go to A1 in the sheet and then go to range named BBB          
     {PANELOFF}{WINDOWSOFF}       Turn the lotus command line off and turn off the screen up-date whilst the macro is running - it speeds up the macro
     /WGDOUDQ                         This line turns off the undo facility
     /FDg:\lad~                          Change directory to g:\lad
     /REC:C3.C:J599~                 Range erase C:A2 to J599
     /REB:A2.B:J4500~                Range erase B:A2 to BJ4500        
     {GOTO}COUNTER3~             Go to range named COUNTER3            
     1~                                       Enter the value 1
     {GOTO}COUNTER9~             Go to range named COUNTER9        
     0~                                       Enter the value 0
     {GOTO}C6ENTRYA~              Go to range named C6ENTRYA
     +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                    
     {GOTO}C6ENTRY~                Go to named range C6ENTRY
     {GOTO}C:C3~                         Go to C:C3
     /RNCTEMP9~~                        Range Name Create TEMP9
     {GOTO}B:A2~                         Go to B:A2
     {getlabel "INPUT AS OF DATE",FILE}                 This is meant to open a dialogue box and allow the user to enter some information but it has been written incorrectly.        
TEST     {LET d:A29,+"I:\015RPTS\sf"&FILE}      Enters I:\015RPTS\sf and the adds FILE to to the string - I assume it is to be able to give a new file name.  The word TEST at the beginning of the line doesn't make sense at the moment.                    
I:\015RPTS\sfTEST     Not sure how this works in the macro
/fccna3..i5000~{ESC}{ESC}{FULL}~          File combine copy named range A3 to i5000 - not usre what the FULL means        
     {EDIT-GOTO "B:G2";;"RANGE"}     Goto and edit range B:G2 by selecting the whole  RANGE - seems a rather unnecessary thing to do!
     /WIC~                     Insert a column    
     @IF(F2="AUD",1/H2,H2)~                If A2=AUD put 1/H2 else put H2        
     /C~.{END}{D}{L}{END}{U}{R}~        Go to the end of the column by going to the bottom of the spreadsheet, moving left one column, going up to the top to the column and the moving one column to the right                    
     /RV{END}{D}~{R}~      Change the entries in the highlighted area to values.                  
     /WDC~              Delete the column containing the cursor          
     /WIC~                Insert a column        
     @IF(F2="EUR",1/H2,H2)~      If F2=EUR then enter 1/H2 else enter H2
     /C~.{END}{D}{L}{END}{U}{R}~   Copy the highlighted range                      
     /RV{END}{D}~{R}~                    Change the entries of the highlighted range to values instead of formulas    
     /WDC~                                      Delete a column
     /RFF5~{END}{D}~                      Format the highlighted range to 5 decimal places  
     {EDIT-GOTO "B:D2";;"RANGE"}    Go to and edit B:D2
     /WIC~                                       Insert a column


Can't imagine this helps at all but there you go! Good luck..

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:


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!

Marketing_InsistsAuthor 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.