You are on page 1of 2

Query variant and output for

background job
This question is answered
We have an old job defined for a specific query. The output of the job is somehow sent to/read by
an external application.
Now we have some new data which require an update to the query selection variant. I updated
all the existing selection variants but the data received by the external application doesn't include
the new data. It seems like the job is running with an old variant selection.
If I look to the job step details, the variant is set like "&0000000000001". If I go to SQ01 and
check the query there is no variant with this ID.
More, if I do a background run from SQ01 for test purpose, and I check after that in SM37 the job
step details, for every new run the variant is incremented with 1 (&0000000000002 ,
&0000000000001 etc.). So the variant ID from the job details do not correspond with the ones
from the query.
If I try to see the output of the job I can't because there is no spool list.
So I have no control what so ever to check if the job runs correctly. The only thing I know is that
in the external application the new data is missing.
Now I have two questions:
1. How can I be sure which is the variant used by the job?
2. How can I see the output of the job?


Daniela Butnar
January 28, 2014 at 13:37 PM
Correct Answer

Privacy Privacy replied

January 28, 2014 at 12:41 PM
So, how we find out the selection parameters from the time of the job run?
Go to SM37; find the 'released' instance of the job.
Select the job, select the 'Step' icon. You will see a listing of the step(s) in the job. Select the
step that contains the unknown variant. Then select Goto > Variant.

Thes next screen contains all the parameters of the variant that was used by the job.

To get an actual screenshot of the variant, select the pencil-values icon.

As mentioned by the other experts, now you can open another session and create a
new NAMED variant which is a copy of the unknown variant. This new named variant can
thereafter be used in your job(s).
Best Regards,