?
Solved

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

Posted on 2009-07-09
3
Medium Priority
?
746 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 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 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