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

Dynamic SUBMIT program

Former Member
0 Likes
1,616

Hi all. How can I write a SUBMIT command to a dynamic program's name ? Is it possible ?

I mean to assign a program name into a variable and use it as the program name at the SUBMIT command.

Thanks,

Rebeka

1 ACCEPTED SOLUTION
Read only

former_member189059
Active Contributor
0 Likes
815

Hello,

From the syntax of Submit,


SUBMIT {rep|(name)} [selscreen_options] 
                    [list_options] 
                    [job_options] 
                    [AND RETURN]. 

So for example,


CONSTANTS: c_program TYPE trdir-name VALUE 'ZSUBMITTED'.
SUBMIT (c_program) AND RETURN.

A constant is used here, it can be a variable as well

1 REPLY 1
Read only

former_member189059
Active Contributor
0 Likes
816

Hello,

From the syntax of Submit,


SUBMIT {rep|(name)} [selscreen_options] 
                    [list_options] 
                    [job_options] 
                    [AND RETURN]. 

So for example,


CONSTANTS: c_program TYPE trdir-name VALUE 'ZSUBMITTED'.
SUBMIT (c_program) AND RETURN.

A constant is used here, it can be a variable as well