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
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