FormSprint Link
Some of you may not realize there is a handy utility for processing forms manually. You are used to processing forms through an active batch job and that's fine for production processing. But when you are developing a form the FormSprint Link (menu option 2) can be very helpful. That's because it lets you control the merging process and it will give you some feedback that you won't get from batch processing. For instance, you know that if a form name doesn't exactly match the formtype of the spool file FormSprint will just put the spool file on hold. With an active batch job that can leave you wondering if the spool file was processed and if it did where is the FormSprint output. FormSprint Link will give you an error message, "Form definiton not found" so you know where to start looking for the problem. Furthermore, function key 13 quickly takes you to the job log where you can
often find some clue to what is causing the form not to process as
expected. Function key 14 takes you to Qtemp where you can display
file DISTPRINT and see how form pages are distributed compared to how
you want them distributed.
You can also easily specify a page range on the Link screen as well as enter a different form name such as SPOOL GRID to override the spool file formtype.
There are a couple of things you need to watch out for when using FormSprint Link. The "Keep or Delete Input Spool File (K, F or D)" default is K so the spool file you are using for testing is kept. When it is processed it is put back on hold. Link gives you easy access to the queue you entered in the virtual queue field with function key 5. You'll use F5 to go to the queue and release the file each time you want to process it. Be aware, though, that if you enter the virtual queue for an active batch job FormSprint will process the spool file as soon as you release it before you can go back and press F1 to manually process it. None of the settings you have in the Link screen such as page range or formtype override will be used because it is the batch job that processed the spool file rather than FormSprint Link.
A second thing that can bite you when you are testing distributed printing through the Link is the "Allow Distributed Printing (Y/N)" flag. It defaults to N and no matter what you have set up in your form, if the flag is N distributed printing will be ignored. When distributed printing isn't working it's either because you forgot to change the collate field in the print defaults to a D or the Link screen is set to N, or maybe both.
FormSprint Link can be used with the PCL viewer in FormSprintCV to display your form and data on your PC rather than print it out. This can save a lot of paper, especially when you are making all those last little tweaks to get the form just right.
Give FormSprint Link a try if you haven't already. It can be a big time-saver.
|
Users want some data bold...
Here's an interesting example of propogating buffers. Buffers are work areas where spool file data, fixed data, graphic and macro calls and even data from other buffers can be loaded. It can then be manipulated with FormSprint functions, concatenated with other data and so on, and then printed out. Buffers can also be propogated. That is, data in one buffer can be copied to the next buffer and so on through a range of buffers.
In our example, the users needed the item number and description in a report BOLD if it was a type=S. The problem was that the 'S' only appeared in the first line of a series of lines for that product type. It would have been a simple matter to look for 'S' and BOLD the appropriate column positions if one was found. Since the 'S' only appeared in the first line, it wasn't that simple. The first step is to look for the 'S' in the series of lines where it might be found and load a 'B' to the front of a buffer when the 'S' is found. The next step is to read that series of buffers corresponding to the series of lines containing the 'S' and look for a 'B' in position 1 with the PRINT IF function.
Once the 'B' is loaded to the front of the buffer, then the next reference line can read the buffer looking for the 'B' using a PRINT IF and write a 'B' to the next buffer if it finds one. That means there will be a 'B' in the next buffer when it reads that buffer so it will load a 'B' to the next buffer and so on through the series of buffers.
But that presents another problem. In our example, the 'S' can occur (or not) anywhere in the detail area, lines 11 through 45, and data that shouldn't be BOLD can appear after data that should. However, in the above step FormSprint puts a 'B' in front of all remaining buffer lines corresponding to the detail lines so we need some way to turn BOLD off.
In this case, the types of data are separated by a line. That means when 'S' data stops there will be a line separating it from the next type of data. By reading the buffer using a PRINT IF to look for 'B_', we can determine where the 'S'-type data ends and mark it with '*'. Then it is simply a matter of clearing the 'B*' marker and printing the buffer twice: once using a PRINT NOT looking for a 'B' to print everything that isn't supposed to be BOLD and again with a PRINT IF that also looks for a 'B' and prints what is.
|
|