Why is my Batch job not selecting rows for my replaceable parameter value, when it selects rows online?

Document ID : KB000012586
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

This document states why a Batch job may not select rows for a replaceable parameter value, when it does select them online.

Question:

Why is my Batch job not selecting rows for my replaceable parameter value, when it selects rows online?

Environment:
z/OS 1.11 and above.
Answer:

When quotations are placed around a value on the 'QUERY REPLACEABLE PARM VALUES' online screen, PRF automatically places double quotes around the value in Batch mode when either (1) the form is submitted, or (2) JCL is sent to a dataset. However, if you choose to update existing JCL, you must add double quotes around your replaceable parm values yourself. For example:

1) If your replaceable parm values screen looks like so:

RPPR.04  r18.0    ------  QUERY  REPLACEABLE PARM VALUES -------   01/09 14:24

COMMAND==>                                                       HAYGR01.GLHQ2

     PARM     Value of Replaceable Parm                                       

  1. USERID   'CERRI01'                                                       

  2. ID       10       

 2) Your Batch job replaceable parameter values should look like this. Notice the double quotes that appear around the USERID ('CERRI01') value:

RUN FORM  HAYGR01.GLHF2               (ROWLIMIT=00000000 SYSPRTDD=01 &&&

&&&&&USERID="'CERRI01'" &&&&&&&&ID=10);