Please enable JavaScript to view this site.

Manual InterForm400 English 2023

Navigation: Auto Forms Control (AFC)

AFC: Error recovery

Scroll Prev Top Next More

AFC (Auto Forms Control) is the automation part of InterForm400. This is where you setup the list of functions, that are to be executed for input spooled files in a given output queue.

 

It can however happen, that the functions in Auto Forms Control may stop with an error. Then you can see that a job stuck is stuck with the status MSGW (Message waiting) in the AUTO_FORM subsystem. The job is normally named the same as the output queue, that is monitored.

 

One thing you can consider is to activate an error monitor, so that a system administrator will get an email in case of an error in an AFC job. This is setup as described in the section, AFC: Error monitor.

 

This section however describes how InterForm400 will help you as much as possible to recover from an error with the Error recovery feature. Please notice, that this error recovery function is only activated, if the AFC job ends. So if e.g. an AFC jobs stops with a message and the job recovers from the message e.g. because you answered I-Ignore or R-Retry, then the error recovery function is NOT activated.

 

Description of normal error handling

Auto Forms Control (AFC) works a bit like a conveyor belt, where each input spooled file pass through all the functions defined for the monitored output queue, but it can be a major problem, if the processing of a spooled file stops with an error message in the middle of these many functions.

 

If you are lucky, then the Auto Forms Control job can recover e.g by answering R-Retry to the pending message. But if you are not so lucky, then the job will be ended.

 

Here it is a good rule of thumb to answer error messages with D-Dump in order to gather as much information about the error as possible - and to also save the joblog. InterForm400 will try to gather this information and include this message, when you have answered the messages:

 

 

                         Additional Message Information                      

                                                                            

 Message ID . . . . . . :   APF9811       Severity . . . . . . . :   00       

 Message type . . . . . :   Inquiry                                           

 Date sent  . . . . . . :   12/05/22      Time sent  . . . . . . :   10:40:45

                                                                            

 Message . . . . :   Internal error in InterForm400. (G)                     

 An internal error was detected in the InterForm400 software. Diagnostic     

   information has been saved to the                                         

   /APF3812Home/ErrorLog/ErrorLog_2022-05-12_767874.zip file.                

 Reply G to resume normal program error handling.                            

 

 

When you answer G to this message some information will be saved into the referenced zip file in the IFS directory: /APF3812Home/ErrorLog and the job is ended.

 

But the problem is now, that the processing of the spooled file has stopped with an error, and you might not even know which of the AFC functions that was executed before the problem stopped the processing. Another potential problem can also be, that you do not even know which spooled file, that the AFC job was processing, when the error occurred.

 

If you have chosen to either hold, move or delete the input spooled file as the final function in AFC (which is recommended), then it should be easy to identify the spooled file, that was partially processed, as you will see this spooled file as the first one on the output queue, that the AFC job is monitoring. If you have not held, moved or deleted the spooled file, then you might be able to identify the spooled file from the last entry in the joblog of this type:

 

                       Additional Message Information                      

                                                                           

Message ID . . . . . . :   AFC5001       Severity . . . . . . . :   00      

Message type . . . . . :   Information                                      

Date sent  . . . . . . :   12/05/22      Time sent  . . . . . . :   11:02:11

                                                                           

Message . . . . :   Dataqueue entry received. Job 756094/KSE/QPADEV0003    

 Spooled filename QPRINT with number 1. See attributes in second-level    

 

In this error message you can see the job name (QPADEV0003), the user profile (KSE), the job number (756094), the spooled file name ( QPRINT) and the spooled file number (1). These values are (normally) enough to uniquely identify the spooled file.

 

 

The error recovery feature

Please notice: If an AFC job stops with an error message and the job recovers without ending e.g. if you reply R-Retry or I-ignore, then the error recovery feature will NOT be activated.

 

The error recovery feature provides additional help in order to:

 

1.Identify the spooled file, that was partially processed in Auto Forms Control.

2.Identify which function sequence number, that stopped with an error.

3.Decide what should be done with the input spooled file, that was partially processed.

 

All of the above can be done, when you start an AFC job, that previously ended in error. Then you will see this message, if you start the job manually with 8=Start AFC-job from the AFC menu:

 

 

          Work with canceled AFC-job                                  AFC308D 

                                                                              

 The AFC-job for outq . . : KSE_ERROR                                         

    Library . . . . . . . :   QUSRSYS                                         

 Was canceled while this spooled file was processed                          

      Job . . . . . . : QPADEV0004     File . . . . . . . : QPRINT            

        User  . . . . :   KSE            Number . . . . . :   000001          

        Number  . . . :   119246       Creation date  . . : 14/10/20          

      Job system name : PMK228         Creation time  . . : 14:00:47          

                                                                              

 While AFC-seqnbr:0002 in outq:KSE_ERROR library:QUSRSYS was processed.       

 The spooled file has status *HELD                                            

 You now have the following options:                                          

                                                                              

 1. Display the spooled file                                                  

 2. Hold the spooled file                                                                              

 3. Move the spooled file to another output queue                             

 4. Start the job ignoring processing this spooled file                       

 5. Start the job processing this spooled file from a selected AFC-seqnbr     

                                                                              

 Option:                                                                      

                                                                              

 F3=Exit                                                          F12=Cancel  

                                                                              

Each of the options are linked to explanations below.

 

Display the spooled file

If you select option 1 on the screen above, then InterForm400 will show you the contents of the spooled file, that was being processed, when the AFC job stopped. If you press Enter, then your session returns to the screen above.

 

 

Hold the spooled file

This option is only visible, if the referenced spooled file is not already held. If you select this option, then the input spooled file will be held and the session will return to the screen above.

 

 

Move the spooled file to another output queue

If you select this option, then you are prompted for which output queue (in which library), that you want to move the spooled file to (the spooled file that was previously not completely processed):

 

 

 

          Work with canceled AFC-job                                  AFC308D  

                                                                               

 The AFC-job for outq . . : KSE_ERROR                                          

    Library . . . . . . . :   QUSRSYS                                          

 Was canceled while this spooled file was processed                            

      Job . . . . . . : QPADEV0001     File . . . . . . . : QPJOBLOG           

        User  . . . . :   KSE            Number . . . . . :   000002           

        Number  . . . :   434741       Creation date  . . : 25/04/22           

      Job system name : PMK230         Creation time  . . : 09:52:59           

                                                                               

 While AFC-seqnbr:0002 in outq:KSE_ERROR library:QUSRSYS was processed.        

                                                                               

                                                                               

                                                                               

 New output queue . . . . NEWOUTQ_                                             

   Library  . . . . . . .   NEWLIB                                             

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

 F3=Exit                                                          F12=Cancel   

                                                                               

 

 

Start the job ignoring processing this spooled file

If you select this option, then the referenced spooled file (that previously was not completely processed) will be ignored and the other pending (ready) spooled files on the same output queue will be processed.

 

 

Start the job processing this spooled file from a selected AFC-seqnbr.

You can freely choose what to do with the spooled file, that was previously partially processed. With this option we can choose to partially process this spooled file. If you select this option, then you will see this:

 

 

          Select sequence number for start of canceled AFC-job        AFC308D  

                                                                               

 The AFC-job for outq . . : KSE_ERROR                                          

    Library . . . . . . . :   QUSRSYS                                          

                                                                               

 Select one of the following options:                                          

   1=Select                                                                    

       AFC-detail lines                                                        

 Opt   Library    Outq       Seqnbr                                            

  1    QUSRSYS    KSE_ERROR  0002  Line with problem.                          

       QUSRSYS    KSE_ERROR  0003                                              

       QUSRSYS    KSE_ERROR  0004                                              

       QUSRSYS    KSE_ERROR  0005                                              

       QUSRSYS    TEMPLATE   0001                                              

       QUSRSYS    TEMPLATE   0002                                              

       QUSRSYS    TEMPLATE   0003                                              

       QUSRSYS    TEMPLATE   0004                                              

 Note|                                                                         

 The line with the problem is the sequence number from the time the problem    

 occured.                                                                      

 If you have updated the AFC-definition since then, The line with the          

 problem might now be another sequence number.                                 

 F3=Exit                                                          F12=Cancel   

 

 

On the screen above you can see an indication of which sequence number, that stopped with an error, and with option 1 you can choose from which of the sequence numbers, that the input spooled file should be processed. If e.g. you have setup AFC to call a user program (which ended in error) in sequence number 2 above, then you can e.g. solve the issue in the program and choose to run AFC from this sequence number again, if you select sequence number 2 as indicated above.

 

A monitored output queue can also refer to a template output queue, where additional AFC functions can be setup. If such a template definition is used, then you can see the reference as in the list above - so we could e.g. choose to run the spooled file from a sequence number in the AFC template. In the example above the template output queue is called TEMPLATE.

 

As mentioned on the screen you should be careful, if you have changed the definitions for the output queue after the error - if you have added or removed a sequence line (or resequenced the AFC sequence numbers) since the error, then you verify the current AFC sequence numbers to decide exactly what sequence number to select now.