OK, then I'll try.
Well, you mention that you want to invoke this as a command from the ISPF 3.4 (DSLIST) panel. Based on that, then we know that you have both the TSO and ISPF environments available, so you'll want to take advantage of them.
Notice on the help panel for the ISPF 3.4 panel that it mentions, for the COMMAND line for each dataset listed, in addition to the commands it supports, that you can also enter a TSO command, REXX exec or Clist. Note that it also mentions that the dataset listed will be passed to that command as a parameter. You'll actually be writing very little of this process in actual REXX.
So, to review your questions at a high level:
Can you please list me various steps/Pseudo code, so that i can achieve to do the following1. Steps for invoking IEBGENER from Rexx.
This would be done the exact same way that you would invoke IEBGENER from TSO. How do you plan on controlling the name of the additional qualifier (i.e. COPY1, COPY2, etc.) if it varies from one execution to another?
2. Process to create a rexx executable.
I'm not sure what you mean by this. REXX is executable via the REXX interpreter which is native to the TSO environment. Are you going to compile your REXX code?
3. To make it called from ISPF option 3.4
Your REXX code is going to have to be made available to your TSO/ISPF command libraries. If the REXX exec will be run in interpreted mode, then it needs to reside in a proper library that's resident to your TSO session. Where specifically that is depends on your site's standards. It may reside in a library allocated to the SYSPROC DD (CLIST or REXX), or in a library allocated to the SYSEXEC DD (REXX only). If you plan on compiling your exec, then the load library it is in will obviously have to be one that's already allocated to either your TSO session or ISPF session (i.e. the ISPLLIB DD).
I'll get you started in the right direction by giving you this:
I'm going to make the assumption that your CLONE exec will be run in standard interpreted mode, and will reside in a common PDS allocated to the SYSPROC DD for your TSO session.
/* REXX */
PARSE ARG THEDSN .
SAY THEDSN
THEDSN = ARG(1)
SAY THEDSN
EXIT 0
I'll let you decide if you prefer the
PARSE ARG instruction, or if you'd rather use the
ARG Built-in Function.