Q.How can more than two program be executed in batch mode
through SBMJOB in CL PGM but the condition is that program
must be executed one by one?Please wtite the senario?

2. IS it possibe more then two programs can be executed in
batch mode and HOw it will be executed in CL
program ,please write the senario?

Answer Posted / amit

I think after SBMJOB of the first PGM you need to retrieve
jobd of it. When the Job is completed then SBMJOB next job.
If you submit jobs together they all are processing
simultaneously which is violation of requirements.

Your second question is not clear to me. But if it is in
continuation of the first question then yes, it is possible
to have more than two programs executed in batch mode and
you will have to continue doing RTVJOBD for submitted job
prior to submitting next job. The loop can be like-

SBMJOB (JOB1)

TAG1 : RTVJOBD (JOB1)

I am not sure which parameter is to be used but there is
one parameter that pertains to job status and If status is
complete GOTO TAG2 else got to TAG1 will give you the loop
required to implement our requirement.

TAG2 : SBMJOB (JOB2).....

you can add one as many jobs as required this way.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can we use ASCII ,CDUP,SENDPASV commands in SFTP?

3145


what is the purpose of putovr (put with explicit override) keyword?

928


when do you use f-spec. Continuation line ?

971


different type of cursor?

634


what does defn do?

608






a multiple format logical file is also known as?

587


Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?

654


I have created a command that display Source file and library. Now i want that when i enter library name and press f4 on Source file, pgm should display all the PF- SRC's in that Library. For F4 option i have used Choice program but since only limited paramters are passed in Choice pgm i am not able to paas library name and further can't call a pgm that will display list of Source files. Below is the Code snippet for CMD type object :- CMD PROMPT('Source Scan for HUB Standard') PARM KWD(SOURCE) TYPE(*CHAR) LEN(1) RSTD(*YES) + VALUES(N A) MIN(1) + CHOICE('N,A') PARM KWD(SRCFILE) TYPE(FILE) RSTD(*NO) + PROMPT('SOURCE FILE') FILE: QUAL TYPE(*NAME) LEN(10) RSTD(*NO) EXPR (*YES) + CHOICE(*PGM) + CHOICEPGM (XXXXXLIB/YYYPGM) QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) + SPCVAL((*LIBL)) EXPR(*YES) PROMPT ('Library') Below is the Choice pgm:- PGM PARM(&PARM1 &PARM2) DCL VAR(&PARM1) TYPE(*CHAR) LEN (21) DCL VAR(&PARM2) TYPE(*CHAR) LEN (2000) IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + 21 1) = 'P')) THEN (DO) /* (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + */ CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') ENDDO IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + %SST(&PARM1 21 1) = 'P') THEN (DO) CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') CALL PGM(GTSQL) PARM ('XXXXLIB') return ENDDO Thanks in Advance for looking into.

3032


define subsystem?

1022


what is arrival sequence?

1104


Difference Between Ca & Cf?

698


which single rpg opcode performs both setll and reade?

1089


how can I predict the performance of my cgis?

644


what is term cua , saa?

948


Explain this error: "all record formats for externally-described file abcd ignored or dropped due to error; file ignored."?

743