Job type change

1150 pts.
Tags:
AS/400 administration
AS/400 jobs
V5R4
Can one change the type of the job(from batch to interactive or viceversa) when that job is running. If possible plz explain the process. thx

Software/Hardware used:
as/400, V5R4

Answer Wiki

Thanks. We'll let you know when a new response is added.

To the best of my knowledge there is no way to do this.

=====================================================

A TFRJOB command could cause a current interactive job to start the next routing step in a batch subsystem, but it would generally remain as interactive. There is no connection between what subsystem a job is running in and the job’s job-type (as long as the target subsystem allows the workstation to enter that subsystem.)

Perhaps the routing step <i>could</i> release a device that it was previously associated with, but I don’t know (1) if that would reset the job-type nor (2) what becomes of the display session since no signoff has occurred. A batch job that acquires and later releases a device leaves the device in its original state, e.g., with a normal logon display.

A batch job <b>can</b> change its job-type to become interactive simply by acquiring a display station and opening a display file.

Tom

Discuss This Question: 11  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Whatis23
    You can not change an actively running job from Batch to Interactive and vice versa. At most you can transfer an active job (TRFJOB) from one active subsystem to another.
    5,665 pointsBadges:
    report
  • philpl1jb
    I've seen a lot of CL programs that are designed so that if they are called interactively they will submit a batch job to call themselves and then end. Phil
    49,550 pointsBadges:
    report
  • ten2008
    Tom, thanks for your reply. But can you plz elaborate on the last sentence ("A batch job can change its job-type to become interactive simply by acquiring a display station and opening a display file.") you wrote and give me an example(how to do this). Phil, can you plz provide one or two example programs of that kind so i can understand the basic process of conversion. thanks
    1,150 pointsBadges:
    report
  • bvining
    A batch job acquiring a display station and opening a *DSPF is still a batch job. While the batch job does now have an interactive display station associated with it is still batch from a system point of view (as I have been rudely reminded in the past when running CL commands that have parameter defaults tied to the job type lol).
    6,445 pointsBadges:
    report
  • A4ginatl
    I think you are confusing the issue here. Just because you transfer a job to a batch subsystem, it does not imply that the job type is changing. Subsystems by default have no unique functionality. They all start with the same basics and then it is the routing entries added to the subsystem that give it its characteristics and abilities, So sometime you could transfer a job to a subsystem where it goes and just sits there, This would be due to there being no routing entires to process the job. In the days of the System/38, companies would add a workstation entry for the programmers restricting the developers to run interactively in QPGMR. They displays would automatically sign in to QPGMR and not QINTER. There batch jobs would generally run in QPGMR too, not just the compiles. Using this technique, at month end, we would shut down QINTER while month end ran. Operations and development continued to work as usual in QPGMR or any other customized subsystem. Darryl Freinkel
    95 pointsBadges:
    report
  • philpl1jb
    If this program is called interactively it kicks off a batch job -- calling itself and passing the input parameters and ends When it's called in batch it runs code that would be after the enddo ------------------ PGM PARM(&PARM1 &PARM2) DCL &PARM1 *CHAR 20 DCL &PARM2 *CHAR 20 DCL &TYPE *CHAR 1 RTVJOBA TYPE(&TYPE) /* 1 = INTERACTIVE JOB */ IF (&TYPE = '1') DO SBMJOB CMD(CALL PGM(MYPGM) PARM(PARM1 PARM2)) GOTO END ENDDO /* STUFF FROM HERE TO END WILL ONLY BE RUN AS BATCH */ END: ENDPGM Phil
    49,550 pointsBadges:
    report
  • TomLiotta
    A batch job acquiring a display station and opening a *DSPF is still a batch job. Sheesh... You're right ... (No surprise.) And I see that it doesn't even return "interactive transactions" even if it does do *DSPF activity. I just tested it to be sure the docs were correct. From that, the questions would be (1) does the system count interactive cycles for such jobs, and (2) has the method of counting those changed in recent releases? I've used "interactive transactions" as a means of detecting inactivity, but never seriously considered that BCH, etc., jobs might not report... not that they really ever needed to. But that's for a different thread... For this question. it seems that the answer is indeed "No" on all sides. @Ten2008: For a trivial CL snippet, review the implications of:
    DCLF       acqbch
    OVRDSPF    acqbch   DEV(&DEV)
    SNDRCVF ...
    
    ...where acqbch is a DSPF and &DEV names a display device that is varied on but not logged onto. In RPG, review the ACQ and REL opcodes. Tom
    125,585 pointsBadges:
    report
  • ten2008
    Sry Tom I am afraid you may be wrong, there is a command called Change Job Type CHGJOBTYP thrugh which a job's type can be changed..correct if i am wrong too... thanks
    1,150 pointsBadges:
    report
  • philpl1jb
    Well, looks like we were all wrong. CHGJOBTYP is in performance tools and will do it. It won't make a screen attach to the job but the job would report as interactive and it can be tuned as interactive. Phil
    49,550 pointsBadges:
    report
  • TomLiotta
    CHGJOBTYP is in performance tools... Ah. Well, IBM can obviously make any facility available they choose. In this case, it's for the cost of Performance Tools. And it's possible that someone could modify internal structures and make a utility available. Regardless, CHGJOBTYP is a viable 'answer', though the restriction of 'Performance Tools' needs to be noted. Nice find in any case, Ten2008 and Phil. Tom
    125,585 pointsBadges:
    report
  • Sloopy
    CHGJOBTYP doesn't really change the job type of a running job. It provides a list of the jobs recorded in a performance tools report file member, and lets you change their type as reported.
    2,195 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following