Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Submit a program with two variants

Former Member
0 Likes
764

Hi all,

There is one program which needs to run everyday with two different variants

( For this i need to have two jobs ).

Now, i need to write a new program which submits the above program with two variants. How do i do it?

Thanks

Abhijith H

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
622

You don't need two jobs, you can have 1 job with two steps, each step would call the progam with the different variant.

If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement. Here VARIANT1 is the name of a variant.

SUBMIT ZREPORT01

USING SELECTION-SET 'VARIANT1'

AND RETURN.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
622

Hi Rich,

But i need two jobs which run at different times.

Read only

0 Likes
622

Oh I see, anyway you can use the SUBMIT statement in your program to submit the program with the variant of choice.



SUBMIT ZREPORT01 
USING SELECTION-SET 'VARIANT1' 
AND RETURN. 

Regards,

Rich Heilman

Read only

Former Member
0 Likes
622

I am assuming that you still want to execute the program twice, once with different variant.

If that is the case, use SUBMIT Program twice, with different variants and call the SUBMIT from the new program.

If you want to get the variant names at run time, look at RSVARIANT function modules.

Regards,

Ravi

Note - Please mark all the helpful answers