Please enable JavaScript to view this site.

Manual InterForm400 English 2023

Navigation: Spooled files > Change spooled files

OSC: Output Schedule Control

Scroll Prev Top Next More

General Description of OSC (Output Schedule Control)

 

Output Schedule Control (OSC) is a sub-system in InterForm400® which main purpose is to optimize the daily mail procedures in an organisation and thereby reduce the postage costs significantly. The key element with this function is that rather then sending 10 envelopes to the same customer, all documents should be sent together.

 

OSC will handle multiple spool files, independently of document type and produce a new single spool file in *SCS format, sorted e.g. according to the recipient name.

 

OSC jobs works differently than Auto Forms Control jobs. OSC jobs are not running at all times. OSC jobs  wake up at specific times of the week and will merge all spool files waiting at a specific output queue into one large SCS spool file. This new spool file can be sorted and distributed and then merged using Auto Forms Control. When all waiting spool files have been handled, the OSC job goes into ‘sleep mode’ again, and awaits the next ‘wake up call’.

 

Output Schedule Control can help you print out in these situations:

1.You have large spool files to print. It is not necessary to print them out immediately after they are created. You want to (automatically) print them out during the night, when the printers are idle.

2.You are going to print out very large spool files and you want to automatically distribute the workload on several printers.

3.You have 2 or more spool files, that are to be distributed to the same customers. For easy and low cost distribution, you want to merge all the spool files to one and sort it, so pages for the same customer are collected and printed together.

4.You have the situation as described in example 3, but the customer information is placed on differently on the page depending on the type of spool file.

5.You want to use the solution described in example 3, but you are sending out letters to customers, and these letters have only customer information on the first page for each customer.

6.The command, STROSCJOB (Start OSC Job) is able to select only specific spooled files, that are merged in this way. The filter can use the spooled file attributes: Job name, user profile, job number and user data. This can be used for e.g. for selecting spooled files for a specific insurance policy or other documents that are build up of smaller spooled files.

 

 

The merge of pending spooled files in an OSC output queue can be triggered in these ways (provided that the OSC subsystem is running):

1.Via the command: APF3812/STROSCJOB.

2.With the option 1=Run OSC on the OSC output queue below.

3.You can schedule start ups with the Specify automatic start scheduling option on the OSC output queue below.

An example is included below.

 

 

The setup of the primary functions of Output Schedule Control is managed by selecting menu option 6. from the main menu. The same menu can be entered directly by the program call:

 

CALL APF3812/OSCADM

 

The menu looks like this:

 

 

InterForm 400  -  Output Schedule Control            System.......: INTER02

                                                     Workstn ID...: IF400_KSE

Select one of the following options:                 User ID......: KSE  

                                                                             

 1. Functions attached to Output Queues                                    

                                                                             

                                                                             

                                                                             

                                                                             

10. Start OSCCTL subsystem / server                                        

11. End OSCCTL subsystem and server                                        

12. Work with OSCCTL subsystem                                            

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

Option: __                                                                  

                                                                             

                                                                             

                                                                             

                                                                             

F3=Exit                     F6=Display messages             F12=Cancel    

 

 

Notice, that as default the name for the related subsystem is OSCCTL and placed in the APF3812 library. This can be changed in the configuration option. If you change the subsystem name and/or the library, the commands below should of course reflect this change.

 

 

10. Start OSCCTL subsystem

 

Output Schedule Control is running as an ordinary System i sub-system, and therefore has to be started as such. It is a good idea to let the sub-system start automatically at IPL. This is done by inserting the following command in your startup program:

 

STRSBS SBSD(APF3812/OSCCTL) MONMSG CPF0000

 

Of course, you can always start the sub-system manually, by the command:

 

STRSBS APF3812/OSCCTL

 

- and you can also configure InterForm400 to start the subsystem whenever the Auto_Form subsystem is started.

 

 

11. End OSCCTL subsystem

 

Before making upgrades the OSCCTL subsystem should be ended.

 

This can be done in the menu or by the command:

 

ENDSBS SBS(OSCCTL) OPTION(*IMMED)

 

 

 

12. Work with Active Subsystem OSCCTL

 

This menu item is a shortcut to the command:

 

WRKACTJOB SBS(OSCCTL)

 

If the subsystem is started, it will look like this:

 

Opt   Subsystem/Job  User        Type  CPU %  Function        Status

      OSCCTL         QSYS        SBS      .0                   DEQW  

        OSCSERVER    AFCOPER     ASJ      .0  PGM-OSC500C      MSGW  

 

Note that the status MSGW (message waiting) is normal, and does not indicate an error (as it usually does).

 

 

 

Describing the OSC definition lines

If you from the InterForm400 main menu choose 6. Work with Output Schedule Control and then 1. Functions attached to Output Queues, then the screen below is shown:

 

 

 

         Work with OSC definitions                                    OSC100D

                                                                             

Position to . . . . . .   __________   Output queue                          

                                                                             

Type options, press Enter.                                                    

  1=Run OSC   2=Change   3=Copy   4=Delete   5=Display   6=Print definition  

  12=Work with output queue   15=Hold output queue   16=Release output queue  

                                                                             

                                                                             

Opt   Output que  Library     Description                               Sts  

 __   AFC_INPUT2  APF3812     Merge several spoolfiles to one           RLS  

 __   BATCH       QUSRSYS     Batch printing.                           RLS  

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                          End

F3=Exit   F5=Refresh   F6=Create   F11=View 2   F12=Cancel                    

 

 

Press F6 to add a new OSC definition, enter the output queue to be monitored by OSC, a description of the job and press Enter.

 

Now this screen is presented:

 

 

 

         Create OSC definition                                        OSC300D  

                                                                               

Output queue . . . . . . :   AFC_INPUT1                                        

  Library  . . . . . . . :     APF3812                                        

                                                                               

Type options, press Enter.                                                    

  1=Select                                                                    

                                                                               

Opt    Definition                                                              

 _     Specify input spooled file priority                                    

 _     Specify placement of input spool file attributes at output              

 _     Define sort fields                                                      

 _     Specify grouping and separator page                                    

 _   R Define resulting output queues                                          

 _     Specify automatic start scheduling                                      

 _     Specify automatic start options                                        

 _   R Specify output queue for processed spooled files                        

 _     Specify job priority                                                    

                                                                               

                                                                               

                                                                               

                                                                               

F3=Exit   F12=Cancel                                                          

 

 

The ‘R’ (required) indicates the lines, which must be filled out before this OSC definition can be used.

 

The various definition lines does the following:

 

Specify input spooled file priority

This definition line is only used for defining what spool file attributes to sort on, if no sorting fields are selected. Normally it is not necessary to fill this out.

 

Specify placement of input spool file attributes at output

If you decide to sort on the spool file attributes in combination with text of each spool page (e.g. customer number), you can do this using this function. This places the attributes on each page.

 

Define sort fields

Here you state where to find the sorting keys (e.g. customer number) on each page. You also refer to positions, where the attributes have been inserted. If all spool files have the sorting fields in the same positions, you only need one sequence line. If the placement of the sorting fields varies, it is necessary to have more sequence lines and to use the page selection criteria. For a description of the page selection criteria see the sort definition.

 

Specify grouping and separator page

Here you decide how many sorting fields, that should change in order for creating a new group. You can also specify to insert a separator page, when changing groups.

 

A group is dealt with as an undividable number of pages. If you choose to distribute the workload on several output queues a group will not be broken up.

 

Define resulting output queues

Specifies on which output queue(s) to place the resulting SCS spool file including all the pages. You can decide, that OSC should balance the workload between several output queues. Using the workload factor. Note that groups defined above are kept together.

 

Specify automatic start scheduling

Specifies weekdays and times, when the OSC job is to autostart and process all waiting spool files.

 

Specify automatic start options

Specify whether or not to send a message when starting or/and when finished. It is also possible to decide to start or not to start the OSC job, if it could not be started at the scheduled time (e.g. because of an IPL).

 

If you e.g. select this:

 

 

 

        Specify automatic start options                              OSC300D  

                                                                             

Output queue . . . . . . :   AFC_INPUT1                                        

 Library  . . . . . . . :     APF3812                                        

                                                                             

Type choices, press Enter.                                                    

                                                                             

Send message . . . . . . .   1              1=Do not send message              

                                           2=Before processing output queue  

                                           3=After processing output queue    

                                           4=Both before and after            

                                                                             

Delayed auto start                          1=Start job                        

option . . . . . . . . . .   2              2=Send inquiry message            

                                           3=Skip delayed jobs                

                                                                             

Message queue  . . . . . .   QSYSOPR                                          

 Library  . . . . . . . .     QSYS                                                                                        

Include InterWord files  .   *NO           *YES, *NO      

Include unicode/DBCS file.   *NO           *YES, *NO      

Codepage for SBCS *DEVD  .   1141                        

Codepage for DBCS *DEVD  .    937                        

                             

Delayed auto start can occur if Output Schedule Control (OSC)                  

- or the entire system - is ended and later restarted.                        

                                                                             

F3=Exit   F12=Cancel                                                          

 

 

 

Then you will get an inquiry message on message queue QSYSOPR the next time the OSCCTL subsystem is started - if the OSC job was scheduled to be run (via option Specify automatic start scheduling) at a time when the OSCCTL subsystem was down. In such cases you will see this message on the specified message queue when the subsystem is started later:

 

 

 

                       Additional Message Information                        

                                                                             

Message ID . . . . . . :   OSC1001       Severity . . . . . . . :   00        

Message type . . . . . :   Inquiry                                            

Date sent  . . . . . . :   27/09/07      Time sent  . . . . . . :   10:41:25  

                                                                             

Message . . . . :   Start time for OSC job APF3812/AFC_INPUT1 exceeded (C G)  

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                             

                                                                       Bottom

Type reply below, then press Enter.                                            

Reply  . . . .                                                                

                                                                             

F3=Exit   F6=Print   F9=Display message details   F12=Cancel                  

F21=Select assistance level                                                    

 

 

If you answer ‘C’ (Cancel) the OSC job will not run now. Answer ‘G’ (Go) to start the OSC job now.        

 

Codepage support in OSC

The bottom options on the previous screen all concerns codepage support. If none are filled out, then InterForm400 will assume that all spooled files are encoded with the system codepage.

 

Include InterWord files

The recommendation is to specify this to *NO unless you specifically want to process spooled files generated by the InterWord400 module. Please note, that if you enable this option with *YES, then OSC is unable to handle unicode and DBCS spooled files (OSC can only handle InterWord400 spooled files or unicode spooled files - not both). So if this option is activated with *YES, then you can only specify *NO for the option below.

 

Include unicode/DBCS files

 

If this option is *NO, then this functionality of OSC is limited. The output will be an *SCS EBCDIC spooled file named OSCPRT (based on printer file APF3812/OSCPRT) in a codepage, that depends on the codepage of the input spooled files:

If all the input spooled files has the same codepage (as seen in the spooled file attribute), then the output spooled file will have the same codepage (also as attribute) as the input spooled files.

If there are spooled files with more than a single codepage, then all the codepages must be in the Latin1 symbol set. If there is such a mix of multiple non-Euro codepages, then the codepages of the output spooled file(s) is codepage 500, and if there is at least one spooled file with a Euro-codepage, then the output spooled file(s) will get the codepage 1148.

If there is a mix of codepages in the input queue, and not all spooled files are in the Latin 1 symbol set, then the OSC job will stop with the error message:

 

                        Additional Message Information                        

                                                                               

Message ID . . . . . . :   OSC1112       Severity . . . . . . . :   40        

Message type . . . . . :   Inquiry                                            

Date sent  . . . . . . :   26/06/19      Time sent  . . . . . . :   11:53:35  

                                                                               

Message . . . . :   OSC job can not run unless you specify include unicode    

  files in the start options.                                                  

The OSC output queue contains spooled files with code pages that can not be    

  combined to a single spooled file unless it is in unicode.                  

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                        Bottom

Type reply below, then press Enter.                                            

Reply  . . . .                                                                

                                                                               

F3=Exit   F6=Print   F9=Display message details                                

F10=Display messages in job log   F12=Cancel   F21=Select assistance level    

 

 

Answer C to cancel the OSC job and the input spooled files will remain on the input queue. Then you can correct the problem in either of these ways before running the OSC job again:

1) Change the option Include unicode/DBCS files into *YES. This change will enable support for unicode as both input and output, but the output spooled file will also require, that you do a unicode merge in InterForm400. The name of the output spooled file will change from OSCPRT into OSCPRTU as described below, and the new spooled file is based on the printer file APF3812/OSCPRTU.

2) You can also move any spooled file, that is causing the problem to another output queue before running the OSC definition again.

 

If the option,"Include unicode/DBCS files" is *YES, then spooled file in any codepage can be used as input on the output queue. The output will be an *AFPDS Unicode spooled file, that is named OSCPRTU, based on the printer file APF3812/OSCPRTU.

 

 

Codepage for SBCS *DEVD

This option tells InterForm400 what codepage to use for spooled files, that has no codepage as attribute (*DEVD). If a value is set here, then the input spooled files without a codepage will be handled as having this codepage. If no value is set and the is an input spooled file without a codepage, then the system codepage (QCHRID) will be used.

 

Codepage for DBCS *DEVD

This option tells InterForm400 what codepage to use for DBCS spooled files, that has no codepage as attribute (*DEVD). If a value is set here, then the input spooled files without a codepage will be handled as having this codepage.

                         

 

Specify output queue for processed spooled files

Specify an output queue for placing the incoming spool files or specify *DELETE for deleting them, when processed by OSC.

 

Specify job priority

Specify the priority of the OSC job.