Can't get LIST WHERE RELATED OUTPUT COMPONENT to work

Document ID : KB000100066
Last Modified Date : 11/06/2018
Show Technical Document Details
Issue:
Checked SCL documentation but can't get the following LIST ELEMENT SCL to work:  

 
           11:37:02  C1Y0015I  STARTING PARSE OF REQUEST CARDS                                                                       
                                                                                                                                     
            STATEMENT #1                                                                                                             
            SET STOPRC 16 .                                                                                                          
                                                                                                                                     
            STATEMENT #2                                                                                                             
            LIST ELEMENT *                                                                                                           
              FROM ENVIRONMENT 'PRD' SYSTEM *    SUBSYSTEM 'STD'                                                                     
                TYPE *        STAGE P                                                                                                
            WHERE RELATED OUTPUT COMPONENT                                                                                           
                  DSNAME "PRM.NDVR.STD.VNDI.LOADLIB"                                                                                 
              BUILD ACTION TRANSFER                                                                                                  
             .                                                                                                                       
            BSTPPARS: E006 VALUE SPECIFIED IS TOO LONG: "PRM.NDVR.STD.VNDI.LOADLIB"                                                  
            BSTPPARS: E099 PARSING TERMINATED DUE TO ERRORS                                                                          
                                                                                                                                     
            STATEMENT #3                                                                                                             
           C1BM4100: E031 NO ACTION REQUESTS WERE GENERATED                                                                          
           11:37:02  C1Y0014E  ERROR ENCOUNTERED WHEN PARSING SYNTAX.  PROCESSING WILL BE TERMINATED.                                
                     END OF EXECUTION LOG - HIGHEST ENDEVOR RC = 0012    


Tried single and double quotes around DSN same error.

What is wrong with the SCL PLEASE?
Cause:
The option coded "WHERE OUTPUT COMPONENT" is incorrect, you must add a component name or a mask; i.e. "WHERE OUTPUT COMPONENT EQUAL *"
Resolution:
Need to add an OPTION clause to the SCL like this --
  LIST  ELEMENT *                                 
   FROM ENV 'PRD'                                   
        SYSTEM *                                 
        SUBSYSTEM 'STD'                              
        TYPE *                                     
        STAGE *                                       
  OPTION                            
  WHERE OUTPUT COMPONENT EQUAL *                   
         DSNAME 'PRM.NDVR.STD.VNDI.LOADLIB'         
  BUILD ACTION TRANSFER                            
   .                                               
/*                                
                

 The above SCL will write the TRANSFER SCL to SYSOUT. 
If you want the TRANSFER SCL written to a PDS member, add a TO DSNAME clause like this:
  LIST  ELEMENT *                                 
   FROM ENV 'PRD'                                   
        SYSTEM *                                 
        SUBSYSTEM 'STD'                              
        TYPE *                                     
        STAGE *                                    
  TO DSNAME 'hlq.mlq.SCL' MEMBER memname      
  OPTION   REPLACE MEMBER                          
  WHERE OUTPUT COMPONENT EQUAL *                   
         DSNAME 'PRM.NDVR.STD.VNDI.LOADLIB'         
  BUILD ACTION TRANSFER                            
   .                                               
/*