I need to create a Rexx program that accepts a filename and the copybook name from the user. It then calls a COBOL program and sends this filename and copybook name to it so that the COBOL program can read the file with its copybook layout. How exactly can this be done?
I searched the WEB and found that LINKPGM can be used to call COBOL from REXX and pass relevant parameters. But will COBOL program identify the filename and copybook name variables so passed? i.e. if we recieve the copybook name in variable 'WS-COPY" in COBOL code and wite COPY 'WS-COPY' to include this copybook in the program, will COBOL accept this? Same goes for Filname to be used in the SELECT and FD clauses of the Code.
Currently I do not have access to mainframes so can't code and test the same. Please throw some light on how exactly I can accompalish this requirement.