Solved

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

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
RPG to c# 3 379
ODBC Linked Server - AS/400 data truncated in SQL Server but fine in MS Query 2 192
AS/400 Overlays 3 17
AS400 QAOSDIAJRN / APYJRNCHG Processing 5 20
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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