Macro Express at the UF Smathers Libraries

Communication Area for Macro Express Unit Developers

Friday, April 21, 2006

> various

Everyone in Monographs now has at least been introduced to the Monographs Suite. Some tweaking is needed before next distribution. A second round of observing workflow should produce more macros. The documentation charge on all of us is somewhat daunting.

I've been doing a lot if Windows study (and continue) that sheds a little light on some of the quirks that seem to arise when we try to create macros. I'll certainly share when I come up with useful techniques.

Both Jason and I assisted Doug Smith (separately) with a macro involving Excel. What I stressed was the use of fleshing out the overall flow both in your mind and with a pencil before actually sitting down to write the script.

I think some of the experience Jason has in parsing tagged markup could come in handy with the current problems with YBP loading of brief records toward the end of the fiscal year. CM Support and our unit are meeting in a couple weeks so we'll see what's needed.

I think combining technologies might be an interesting experiment. For example: having a macro call on a VBA Macro within an MS Office application or wrapping the promptcat utitlity currently run by Gerald in a macro for a friendlier interface. --mj

Monday, April 17, 2006

> Nested File Processing Loops

Working on Macros: DEWEY identification project

Working with very large files from a ret-adm-01 report (Items module)
Requested by Iona Malanchuk

The problem I encountered was the the ret-adm-01 reports were too large to generate their normal table view. The results found from the report were a combination of Dewey and LC call #'s. I only wanted the Dewey Results.

I saved the source code to a temp file on my hard drive and developed a macro to read the results.

I hadn't worked with this particular report type but it wasn't very dissimilar from others I have worked on in the past.

I am writing this post because in the past I have used IF/THEN loops to handle most of the logic involved in the macro process. Because I was also performing a logical function of discriminating between Dewey and LC results I couldn't just strip out the information I wanted to include.


I created a Text File Begin Process loop and added an Integer Counter to keep track of what line number I was on. When the macro encountered a Barcode I knew I was at the beginning of the information segment I wanted to analyze.

I then started an embedded Text File Process that started at the line number I was on. This process stripped out the information elements I needed and when it was finished it examined the call # to ensure that it was of the correct type. If it was it then saves the information to a text file that will be converted to an excel spreadsheet.