Solved

TFRJOB failes - Job not transferred. System request in effect for job.

Posted on 2009-07-09
3
740 Views
Last Modified: 2012-05-07
I have a simple routing program that based on the device name it transfers the job to the appropriate subsystem.

The problem is that if the user does a system request 1 then signs on to the secondary session with a user profile that envokes my routing program the TFRJOB in my routing step fails (CPF1373 - Job not transferred. System request in effect for job) and then the routing program gets called again.

Question:
Is there a way I can tell that the signon is from a system request 1? This way I can just process the request instead of transfering the job.

Thanks
/*                                                                  */
             PGM                                                      
             DCL        VAR(&DEVICE) TYPE(*CHAR) LEN(10)              
             MONMSG     MSGID(CPF0000)                                
/*                                                                  */
/* If a scan device transfer to QINTERW                             */
/*                                                                  */
             RTVJOBA    JOB(&DEVICE)                                  
             IF         COND(%SST(&DEVICE 1 4) = 'SCAN') +            
             THEN(DO)                                                 
               TFRJOB     JOBQ(QINTERW)                               
               GOTO       CMDLBL(@END)                                
             ENDDO                                                    
//*                                                                  */ 
/* If not apply default routing                                     */ 
/*                                                                  */ 
             TFRJOB     JOBQ(QINTER) RTGDTA('QCMDI')                   
                                                                       
 @END:       ENDPGM

Open in new window

0
Comment
Question by:Bob Hoffman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
tliotta earned 500 total points
ID: 24819917
HBHoffman:

Assuming that the first TFRJOB is correct, I don't quite get the purpose of this command:

     TFRJOB     JOBQ(QINTER) RTGDTA('QCMDI')  

I would expect this command instead:

     TFRCTL     PGM( QSYS/QCMD )

What subsystem is this associated with? Actually, why is there a routing program at all if the routing is controlled by device names anyway? Why not just route via workstation name or type entries? (Perhaps because the names don't fit 'generic' expectations?)

Tom
0
 
LVL 8

Author Closing Comment

by:Bob Hoffman
ID: 31601933
Workstation name/type entries are not feesible for other reasons to complicated to explain here. The custom routing program is in QINTER, the idea was to route it back through QINTER and force it through the standard routing program if it wasn't a device the starts with 'SCAN'. The users associated with the routing programs are all on hand-helds so the system request issue never came up.  That said.. switched it to TFRCTL, works great! Thanks for the help

0
 
LVL 27

Expert Comment

by:tliotta
ID: 24827620
HBHoffman:

Minor added note... the TFRCTL not only reduces routing workload, etc., but also clears your custom routing program from the call stack. Makes for a fairly clean job all around. The TFRCTL probably ought to be enforced even for unexpected error conditions.

One use that I make is to have a "BBS" kind of display -- when I enable it (usually via a *DTAARA value), it inserts a message window with whatever text I choose, e.g., [System will be brought down at 5:30 PM for maintenance today.]

Glad it worked for you.

Tom
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Determining the an SCCM package name from the Package ID
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question