When selecting option 1. Functions Attached to Output Queues in the menu 6. Work with Output Schedule Control on the main menu we get the screen below:
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 2 OSC_OUTQ01 APF3812 Output Schedule Control DEMO definition RLS
End F3=Exit F5=Refresh F6=Create F11=View 2 F12=Cancel
|
Press F6 to create a new OSC definition. When created press F5 to have it updated in the above screen.
Create OSC definition OSC110D
Output queue . . . . . . . OSC_OUTQ01 Library . . . . . . . . APF3812___
Description . . . . . . . Output Shedule Control DEMO definition
|
To update and change an OSC definition enter 2 in front of the OSC output queue. The following OSC definitions will appear. Enter 1 in front of the OSC entries you wish to change.
Change OSC definition OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type options, press Enter. 1=Select
Opt Definition 1 > Specify input spooled file priority _ > Specify placement of input spool file attributes at output _ > Define sort fields _ > Specify grouping and separator page _ > Define resulting output queues _ > Specify automatic start scheduling _ > Specify automatic start options _ > Specify output queue for processed spooled files _ > Specify job priority
F3=Exit F12=Cancel
|
Specify input spooled file priority
Specify input spooled file priority OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type choices, press Enter.
Sorting- Input spooled file priority Form type . . . . . . . . _10 Job name . . . . . . . . . ___ Job number . . . . . . . . ___ Spooled file . . . . . . . ___ Spool file no. . . . . . . _20 Device file . . . . . . . ___ Library . . . . . . . . ___ Program that opened file . ___ Library . . . . . . . . ___
This sort sequence will be used for pages (defined at "Define sort fields") having identical sort values. Lowest number have highest priority.
F3=Exit F12=Cancel
|
In the above entry screen we define which sort values should be used and what priority
they have. Above we have selected that the FORM TYPE of the document, have highest sort priority and following the SPOOL FILE NO. should be used.
Specify placement of input spool file attributes at output:
Specify placement of input spool file attributes at output OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type choices, press Enter.
- Insert into -- Input spooled file Line Position Form type . . . . . . . . __1 110 Job name . . . . . . . . . ___ ___ Job number . . . . . . . . ___ ___ Spooled file . . . . . . . ___ ___ Spool file no. . . . . . . __1 120 Device file . . . . . . . ___ ___ Library . . . . . . . . ___ ___ Program that opened file . ___ ___ Library . . . . . . . . ___ ___
The same placement will be used for all pages. Use a area that is blank for all pages in the input output queue.
F3=Exit F12=Cancel
|
In the above entry screen we define where the sort criterias should be inserted in the spool files, that will be used in the OSC output queue.
WARNING: The positions selected above must be positions where now other information will be stated. If the original spool data are in the same positions as specified above, they will be over written.
Define Sort Fields
Work with OSC sort definitions OSC330D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Position to . . . . . Sequence
Type options, press Enter. 2=Change 3=Copy 4=Delete 5=Display 7=Change sequence
Opt Seqnbr. Description 2 1 Find inserted sort fields
End F3=Exit F5=Refresh F6=Create F12=Cancel
|
Press F6 to create a new Sort Definition. Enter 2 in front of an existing sort definition to change.
Change OSC sort definition OSC335D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Sequence . . . . . . . . : 1 Description . . . . . . . Find inserted sort fields
Page selection criteria Print line Position Oper Compare value ___ ___ - ___ ____ _________________________________ ___ ___ - ___ ____ _________________________________ ___ ___ - ___ ____ _________________________________
Find sort fields in the following positions Sort field no. Print line Position 1 __1 110 - 119 2 __1 120 - 129 3 ___ ___ - ___ 4 ___ ___ - ___ 5 ___ ___ - ___ 6 ___ ___ - ___ F3=Exit F12=Cancel
|
In the above entry screen we define in which positions OSC will find the SORT fields, which we previously defined. An extra feaure is the Page selection criteria, where we can define which spool pages should be sorted, based on the spool data contents. For further information about the page selection criteria see the sort definition.
Specify Grouping and separator page:
Specify grouping and separator page OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type choices, press Enter.
Group by number of sort fields . . . . . . . 1 1-6
Insert separator page before start of new group . . . . Y Y=Yes, N=No
A new group occurs when the content of one or more sort fields (from sort field one to "Group by number of sort fields") changes. All pages of a group will always be sent to same the output queue.
F3=Exit F12=Cancel
|
A group is a number of successive pages having identical values in one or more sort fields. In the above entry screen specify how many sort values should be included in a group. Furthermore, specify if you wish a separator page between groups.
Define resulting output queues
Work with OSC resulting output queues OSC350D
Output queue . . . . . . : AFC_INPUT1 Library . . . . . . . : APF3812
Type options, press Enter. 2=Change 3=Copy 4=Delete 5=Display
---- Destination ----- Workload Opt Output que Library factor __ AFC_INPUT1 APF3812 40 __ AFC_INPUT2 APF3812 60
End F3=Exit F5=Refresh F6=Create F12=Cancel
|
In the above entry screen we define one or more resulting output queues for OSC to send the resulting spool file. As the resulting spool file could be quite big, it is possible to define more output queues to share the resulting spool file. Furthermore, we can define which workload factor the resulting output queues should have.
Above we have defined two resulting output queues to share the resulting OSC spool file. The workload have been set to be 40% for output queue AFC_INPUT1 and 60% for output queue AFC_INPUT2.
Specify automatic start scheduling
Specify automatic start scheduling OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type choices, press Enter.
Monday Tuesday Wed.day Thursday Friday Saturday Sunday 15:00 15:00 15:00 15:00 14:00 _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____
F3=Exit F12=Cancel F20=Sort by time
|
In the above entry screen we can define a scheduled start time of each day of the week, if an automatic run of the OSC job is required. As an alternative to a scheduled start of a OSC job, the job could be started manually by the option 1. Run OSC in 1. Functions attached to output queues.
Specify automatic start options
Specify automatic start options OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type choices, press Enter.
Send message . . . . . . . 4 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 . . . . . . . . . . 1 2=Send inquiry message 3=Skip delayed jobs
Message queue . . . . . . QSYSOPR___ Library . . . . . . . . QSYS______
Delayed auto start can occur if Output Schedule Control (OSC) - or the entire system - is ended and later restarted.
F3=Exit F12=Cancel
|
When the hour has come for OSC to start a OSC job, we can define some options, in connection with the OSC job. First we define when or if we wish to be notified about an OSC job. In addition we can define what should happen in the event that there has been taken back-up of the System i, IPL has been performed or any other reason for the OSC job not being able to run at the scheduled time.
Finally we define where possible messages are to be sent.
Specify output queue for processed spooled files:
Specify output queue for processed spooled files OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type choices, press Enter.
Output queue . . . . . . . ARCHIVE Output queue, *DELETE Library . . . . . . . . APF3812
All input spooled files will be moved to the specified output queue, or will be deleted if *DELETE is specified.
F3=Exit F12=Cancel
|
When the OSC jobs have been executed we can define what should happen with the original spool files, taken from the OSC output queue. As per above entry screen, we can define if we wish to delete the spool files or we could enter an output queue for archiving purposes.
Specify job priority
Specify job priority OSC300D
Output queue . . . . . . : OSC_OUTQ01 Library . . . . . . . : APF3812
Type choices, press Enter.
Job priority (RUNPTY) . . 50 11-99
Form type . . . . . . . . *OSC______
F3=Exit F12=Cancel
|
Above we enter the desired run priority of the OSC job, and the form type used for the merged spool files.
The OSC definition has now been completed and upon exit from the OSC definitions we will be asked to save the definition.
Now you only have to setup Auto Forms Control jobs to monitor the output queues AFC_INPUT1 and AFC_INPUT2.