Variable length variable in a deferred DQ PROC
search cancel

Variable length variable in a deferred DQ PROC

book

Article ID: 103921

calendar_today

Updated On: 01-15-2025

Products

Datacom DATACOM - AD IPC Ideal

Issue/Introduction

In Dataquery DQRY, use the #DQOPERATORNAME variable in a Deferred query.

Need a way to uniquely identify each EXPORTed DSN to a user.

How is a variable length variable passed via DQ PROC? 

Refer to Datacom Core - 15.1 section on Dataquery Batch Online Management: Important Concepts

Commas in JCL 

If a JCL variable ends with a comma, the variable must be on the end of the line because a blank is required to indicate the end of the variable. 
..." .

But, if a space is placed at the end of the variable, it will add the blank to DSN node, causing JCL error IEFC605I.

This is the Dataquery PROC:
.. ================================ T O P =====================================
01 //TP1DQFBF JOB (999,APP4),'P1 NEW DQRY FB FILE ', 
02 // CLASS=X,MSGCLASS=R,NOTIFY=&SYSUID 
03 //STEP01 EXEC DQBATCH 
04 //DQFIXD DD DSN=HLQ.A1?****** .DQRYFB.2?********, 
05 // DISP=(NEW,CATLG,DELETE), 
06 // SPACE=(CYL,(1,1)),UNIT=SYSDA 
07 //SYSIN DD * 
08 /* DQ INPUT 
09 // 
.. =========================== B O T T O M ==================================


After adding the blank, note the JCL errors from the execution:
XX*===================================================================
19 //DQFIXD DD DSN=HLQ.A041194 .DQRYFB.MYTEST02, 
20 // DISP=(NEW,CATLG,DELETE), 
21 // SPACE=(CYL,(1,1)),UNIT=SYSDA 
22 //SYSIN DD * 
23 // 
O. MESSAGE 
2 IEFC001I PROCEDURE DQBATCH WAS EXPANDED USING SYSTEM LIBRARY …
20 IEFC605I UNIDENTIFIED OPERATION FIELD 
21 IEFC605I UNIDENTIFIED OPERATION FIELD

 

How is a variable length variable defined in a deferred DQ PROC?
 

Resolution

Since the blank will cause a JCL error in this case, use JCL SET statements to assign the values instead:

Modified DQ PROC using JCL SET statements: 

//TP1DQFBF JOB (999,APP4),'P1 NEW DQRY FB FILE ', 
// CLASS=X,MSGCLASS=R,NOTIFY=&SYSUID 

// SET MYUID=A1?****** 
// SET MYFILE=2?******** 

//STEP01 EXEC DQBATCH 
//DQFIXD DD DSN=HLQ.&MYUID..DQRYFB.&MYFILE.,
// DISP=(NEW,CATLG,DELETE), 
// SPACE=(CYL,(1,1)),UNIT=SYSDA 
//SYSIN DD * 
/* DQ INPUT 
// 

Additional Information