Page 1 of 1

after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 3:36 pm
by gizmo
Hi all,

My requierment is as below :

I want to copy all of name of file (55 files) from a file (FILE_NAME) into the library 'library_name'.

i want to pass paramaters from REXX to JCL, VIA endevor;

Here is my extract program REXX :
/* REXX */
CALL READ_FILE                                  
EXIT                                                  
/************************************/                
READ_FILE:                                      
 ADDRESS TSO                                          
"ALLOC FI(FIC) DA('FILE_NAME') SHR REUSE"
"EXECIO * DISKR FIC (STEM EX. FINIS"                  
DO I=1 TO EX.0                                                                            
VARFIC=SUBSTR(EX.I, 1, 10)                              
CALL TREATEMENT_TABLE                                      
EXIT                                                  
END
RETURN
/************************************/                
TREATEMENT_TABLE:                                                          
QUEUE "//job_name JOB ...         "
QUEUE "//name_proc PROC FIC1= "                                    
QUEUE "//*--------------------------------------------------------- "  
QUEUE "//STEP0    EXEC PROC=àENDEVOR "                                
QUEUE "//*--------------------------------------------------------- "  
QUEUE "//BSTIPT01 DD  *,SYMBOLS=JCLONLY "                              
QUEUE "  RETRIEVE ELEMENT &FIC1                             "      
QUEUE "   FROM SYSTEM system_name SUBSYSTEM subsystem_name                   "      
QUEUE "     ENVIRONMENT env_name STAGE stg_name                         "      
QUEUE "     TYPE type_name                                            "      
QUEUE "   TO DSNAME 'library_name' MEMBER &FIC1"      
QUEUE "     OPTIONS CCID 'ccid_name'                         "      
QUEUE "     REPLACE MEMBER .                                    "      
QUEUE "//            PEND"
QUEUE "//***************"                                                                                  
QUEUE "//E1 EXPORT SYMLIST=(FIC1)"                
QUEUE "//STEP1 EXEC PROC=name_proc,FIC1=&VARFIC"    
QUEUE "AA"                                            
ADDRESS TSO "SUB * END(AA)"                                                      
RETURN                                                
 

But, after the execution of the job, i have the error message :

RETRIEVE ELEMENT &FICARG                              
    FROM SYSTEM system_name SUBSYSTEM subsystem_name                
      ENVIRONMENT env_name STAGE stg_name                              
          TYPE type_name                                          
             TO DSNAME 'library_name' MEMBER &VARFIC
               OPTIONS CCID 'ccid_name'                        
                  REPLACE MEMBER .                                    

 C1BM4100: E044 INVALID NAME SPECIFIED - ALLOWABLE CHARACTERS ARE: à, £, $, a-z, A-Z, 0-9, - and _
 

The '&' before VARFIC is a normal syntax, i think.

What is wrong ?

Please, help me.
coded for you

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 3:59 pm
by NicC
The '&' before VARFIC is a normal syntax, i think.

"Normal" syntax for what? Which language? Rexx? Endevor? JCL?

Please use the code tags when presenting data and code:
[code]your fixed font text[/code]

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 4:36 pm
by gizmo
The syntax '&VARFIC' is rejected by the system. What is the normal syntax (&&VARFIC, &VARFIC. is out) ?

That's why I have the message : C1BM4100: E044 INVALID NAME SPECIFIED - ALLOWABLE CHARACTERS ARE: à, £, $, a-z, A-Z, 0-9, - and _

Help me please !

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 4:47 pm
by gizmo
i make a precision : i want to pass parameter from REXX to ENDEVOR (via jcl)

I suppose it's more clear.

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 4:55 pm
by expat
If you are generating JCl or control statements I suggest that you use ISPF file tailoring much easier to maintain.

You need to post the output from a TRACE I as well, or at least read through it yourself to see exactly what gets generated and hopefully you will fix it then

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 5:08 pm
by enrico-sorichetti
https://www.ibm.com/support/knowledgece ... ameter.htm

but since You build the jcl Yourself there is no need to use symbols,

You can resolve them Yourself in the rexx code
instead of
QUEUE "  RETRIEVE ELEMENT &FIC1                             "  

use somethin along the line of
QUEUE "  RETRIEVE ELEMENT " the_element_name  


the same for all the other occurrences of jcl symbols

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 5:15 pm
by NicC
"//STEP1 EXEC PROC=name_proc,FIC1=&VARFIC"  

VARFIC is a Rexx variable. You need to substitute it into the JCL statement that you are queueing:
"//STEP1 EXEC PROC=name_proc,FIC1="VARFIC  

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 5:35 pm
by gizmo
Thanks a lot NicC.

Except it's

"//STEP1 EXEC PROC=name_proc,FIC1="VARFIC""


instead of

"//STEP1 EXEC PROC=name_proc,FIC1="VARFIC


The mistake is ' " ' in the end of VARFIC .

By

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Mon Sep 24, 2018 6:30 pm
by NicC
No, all you have done by appending the "" at the end is append nothing at all to the string. In either case the string put on the queue is
//STEP1 EXEC PROC=name_proc,FIC1=
and the value stored in VARFIC.

Re: after 'EXECIO', passing parameters from REXX to JCL

PostPosted: Tue Sep 25, 2018 11:50 pm
by Pedro
I want to copy all of name of file


You did not provide an example of the input file records. I worry that you have extra stuff in the input records.