Solved

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

Posted on 2009-07-09
3
742 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

688 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