The 5 Stages of Diary Generation

Navigation:  Scripts > Diary Generation >

The 5 Stages of Diary Generation

Previous pageReturn to chapter overviewNext page

This section will explain what is happening at each stage of diary generation. Once you click OK in the Execution Options dialog, diary generation proceeds essentially uninterrupted and unattended.

 

Unless you have set some properties that request execution to pause.These interruptions will be discussed in italics. You can abort execution through most of diary generation by pressing the Abort button in the progres dialog.

 

At this stage your script is saved; if it is a new script which was never saved, the Save Script dialog will appear.

 

The Q++ Diary Generation progress dialog appears; it will keep you informed through the entire process (the main progress bar at the bottom of the main window shows the overall completion of the Script execution).

 

1. Creating Local Tables

 

As a first step, Q++ makes local copies of the data you will need to run your Script. Only the data subset used by your Script is copies over. This greatly speeds up diary generation for 3 reasons :

 

Once the local copy is made, you are using a temporary database on your PC; you are no longer competing with other users for access time to the database. This concurrent access may make you lose only a fraction of a second; which is not a big issue when editing data (ie. entering holiday rules, etc…). But during diary generation there are tens of thousands of accesses to the database. That number times even a fraction of a second would slow down diary generation unnecessarily.

 

Even if there are no other users accessing the Q++ database, access to a local table will always be significantly faster than accessing the shared database over a network.

 

Finally, Q++ only makes a copy of the data it needs for the current Script. This means that the templates table may contain only 2 or 3 templates at the most out of 100 or 200 you have scanned, the languages table may contain only 1 language instead of the 10 languages in the shared table, etc… Reducing the local table by a factor of 10 on average also greatly increases diary generation speed.

 

Once the local tables are created, Q++ starts to evaluate all the tokens contained in each of the pages of the full Script. As each token is evaluated, Q++ generates a file of p-Code instructions that it will later send to QuarkXPress.

 

2. p-Code Generation

 

As p-Code is generated, you may notice that the number of p-Code errors is updated, and that token processing errors are displayed in the Messages Window. The format of these run-time messages is different from the design-time messages. They indicate the page where the message originates from and the message (a list of these messages can be found in Annex 2 : Run-Time Messages). You will not be able to access these messages during diary generation, but you will be able to list them, or view them directly in QuarkXPress afterward.

 

3. p-Code Conversion

 

The p-Code tables generated in the previous step are converted to plain-text CSV files that QuarkXPress can understand.

 

4. Copying GridTemplates and Plain Qxd Files

 

Once the p-Code file is generated, Q++ launches QuarkXPress and pilots it as it makes as many copies of your original GridTemplate as are necessary to build the final output file. At this stage, all the pages of the output file are generated, except that none of the tokens contained in the GridTemplates has been replaced. For complex grids and diaries containing over 150 pages, this step can easily be the longest one, in particular if your templates contain multiple layers with many objects located on layers other than the default layer.

 

5. Replacing Tokens

 

In the last step, QuarkXPress uses the p-Code table generated earlier to replace tokens in all dated pages of the output file. As soon as this step is complete, diary generation will be complete. If your Script contains Saras, Q++ will automatically start performing Saras (step 5 below), otherwise you can inspect your output file.

 

6. Performing Saras (optional)

 

At this stage, if your Script contains Saras and if you set the option to "Display list of Saras before Performing them", script execution will pause and display a list of all the Saras contained in your script. Any Saras belonging to your Script are then performed. The SaraSets belonging to the various DiaryGridLines and the Post-Processing ScriptLine are all combined into one temporary SaraSet.

 

See also : Problems During Diary Generation.


Topic 107109 updated on 24-Jun-2016.
Topic URL: http://www.qppstudio.net/webhelp/index.html?thestagesofdiarygeneration.htm