Detecting language please wait for.......
I wanted to offer a better way to "x-out" macros in style setups.
Often when working with customer samples and composing them (or looking through the composition messages with View Log), I see lots of composition messages such as the following:
invalid xycode name (2) name = <xxmc;test;macro1;macro2>
It seems that many customers are in the habit of "x'ing out" macros in their style setups (by adding something like an "xx" prefix to the macro name) when they don't want them executed, but at the same time want them left "visible" when looking at the setup (probably in case they need to revisit the changes).
However, sometimes there are so many of these types of "error" messages that it's hard to pick out the significant composition errors. And when background queues are used to run many composition tasks, such "junk" error messages (en mass) can quickly cause queue log files to grow very large in size.
There's a better way to do this.
If you take a look at the xy_sys spec (in Lsyslib), you will see that the very first macro definition has a name of "__" (two underlines) and has an empty expansion. This definition was added years ago for use by import/export (toxsf/fromxsf) to "mark" non-XPP PI macros in the (SGML/XML) data on import so that they would be ignored by composition (and then on export the special "__ " prefix gets removed so that the data round-trips w/o any changes).
But this same mechanism can be used for macros within style setup that you want to be ignored (i.e. in xx and mx spec Expansion fields and in if spec Prestring, Poststring, and XML/SGML End fields).
So, for example, in an xx Expansion field instead of doing:
you would do:
You can also use this to do things like the following:
<__;/qa><mc;test;__(macro1);macro2> (as long as macro1 is not "skp" or "nul")<mc;test;__(macro1,arg1,arg2),macro2>
The macro is still there, but by virtue of adding the "__" name it effectively gets ignored by composition (due to the empty expansion for the "__" macro) - and the bonus is that no "invalid xycode" error messages are output either. Now the composition error messages/logs are only filled with significant error messages.
Just to be clear, this suggestion is only in regards to the "style" setup within XPP; do not do this in the imported data (stream) itself.
Jonathan DagrestaSDL XPP Engineering
We have a slightly different solution - instead of <xxmc;test;macro1;macro2> we use <x;mc;test;macro1;macro2> where x is in our master library macro spec with no expansion. It is then equally easy…
I just modified my original post as to syntax.
After seeing Chris Leggett's reply it occurred to me that I had not written the recommended "x'd out" macro alternatives using the traditional semi-colon…
I appreciate Chris mentioning an alternative; users are certainly free to define their own "ignore" macro.
Just keep in mind that one advantage of using the "__" macro is that it is already defined…
Maybe this should be a session come October.
We ran into a situation where we were calling "compose" via XPP Web Services 1.2 with XPP 8.4, and the call would fail, but we were able to compose the division from PathFinder. It turned out that, since the "Compose" command returned the compose log contents, once the log file got to be around 8 megabytes in size, the web service call would fail. In our case, the errors were almost all typos and old code that people didn't clean up. Once we fixed those obvious problems, the log file size was more like 30 or 40 KB.
Now, that 8 MB limitation may not apply in the latest version of XPP WS, or with the REST API, but it demonstrates how you can get unexpected side effects if you don't pay attention to the compose log.
Both XPPWS 1.3 and XPPrest stopped returning the logfile in the compose call for just this reason. It was more important in the SOAP rest because responses end up in XML and it can get inefficient when there is a lot of data returned. XPPrest could have handled it, but there was no reason to return the log.
And to get the log after the compose, you can do a "get file" on job.log.
So you can upgrade to XPPWS 1.3 if you like. It is upwards compatible and should solve this problem.
Although this would be impossible with the wretched "Forward reference" 'errors' - unless this has been resolved already?
FYI, in the XPP 9.4.0 release there is a new JT option to turn off the reporting of the composition "Forward reference" messages.
HALLELUJAH! I've been asking for that one at the XYUG Wish List meeting for-ev-er. One down 382 to go. ;)