Solved

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

Posted on 2009-07-09
3
729 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now