after 'EXECIO', passing parameters from REXX to JCL



IBM's Command List programming language & Restructured Extended Executor

after 'EXECIO', passing parameters from REXX to JCL

Postby gizmo » Mon Sep 24, 2018 3:36 pm

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
gizmo
 
Posts: 5
Joined: Mon Sep 24, 2018 2:29 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby NicC » Mon Sep 24, 2018 3:59 pm

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]
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2824
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 118 times

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

Postby gizmo » Mon Sep 24, 2018 4:36 pm

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 !
gizmo
 
Posts: 5
Joined: Mon Sep 24, 2018 2:29 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby gizmo » Mon Sep 24, 2018 4:47 pm

i make a precision : i want to pass parameter from REXX to ENDEVOR (via jcl)

I suppose it's more clear.
gizmo
 
Posts: 5
Joined: Mon Sep 24, 2018 2:29 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby expat » Mon Sep 24, 2018 4:55 pm

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
expat
 
Posts: 434
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 5 times

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

Postby enrico-sorichetti » Mon Sep 24, 2018 5:08 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2797
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 148 times

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

Postby NicC » Mon Sep 24, 2018 5:15 pm

"//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  
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2824
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 118 times

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

Postby gizmo » Mon Sep 24, 2018 5:35 pm

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
gizmo
 
Posts: 5
Joined: Mon Sep 24, 2018 2:29 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Mon Sep 24, 2018 6:30 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2824
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 118 times

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

Postby Pedro » Tue Sep 25, 2018 11:50 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 592
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 43 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post