2. What do unusual return codes such as -3 and 0196 mean?

Basically they are either decimalised abend codes or
indicate a problem with the environment.

3. How to pass parms to ISPF Edit macro?

On the command line in the editor, just use the name of the
macro and list the paramters behind it. E.g. if you have a
macro called FINDALL and it expects 3 parameters you would
specify in the commandline: FINDIT parm1 parm2 parm3

When you code the MACRO the first line should be like:
Address ISREDIT "MACRO (parm1 , parm2, parm3)".

Since you are working with REXX you could have used:
Address ISREDIT "MACRO ( parm )"
You then parse the parm like this:
Parse (UPPER) Arg parm parm1 parm2 parm3

4. How to code the db2 queries using rexx, and also plz send some link and examples using db2 queries?

REXX doesn't have support to DB2. But still you can access
it thru some TSO CPs. One of the commercial CP is
REXXTOOLS/MVS. If your shop has that s/w installed you
could able to access DB2.

5. I want to code a REXX Program in order to load many tables in a database simultaneously in a batch fashion. Currently batch codes ar available in which only one job is submitted at a time and this loads only one table. My requirement is that many tables should be loaded at a time when one Job is submitted and can this be done using REXX Tool?

Not exactly sure what you are asking.

Can a REXX exec submit multiple jobs via the internal
reader? Yes.

Can you update multiple tables in a RDBMS? Yes, however
referential integrity could be compromised and RDBMS
overhead could be a serious issue.

Let's assume that you have that you are seeking to load DB
tables from a 100K+ 1NF file which has some 6257 bytes per
recode You would use REXX (CMSPIPES) to split the file while
keeping a common key. You would split this 1nf record in 3nf
tables. You would need to know the data and some aspects on
how it will be used --- Remember Data Privacy is important too.

6. Suppose If there are a set of statements and each has a word "value" in it, If I want to display all these statements so that the word "value" is aligned, then how do
I code this in REXX.
e.g - The value of X is Y.
Wot is its value?
Do u know its value?
I want to know its value?

/**REXX**/
ADDRESS TSO
"ALLOC DD(INP1) DA('input-dataset') SHR REUS"
"EXECIO * DISKR INP1 (STEM IN1. FINIS"
MAX_OFFSET = 0
INP_OFFSET = 0
DO I = 1 TO IN1.0
PARSE UPPER VAR IN1.I INP
INP_OFFSET = POS("VALUE",INP)
IF INP_OFFSET > MAX_OFFSET THEN
DO
MAX_OFFSET = INP_OFFSET
END
END
DO I = 1 TO IN1.0
PARSE UPPER VAR IN1.I INP
Z = POS("VALUE",INP)
SAY LEFT(SUBSTR(IN1.I,1,(Z - 1)),(MAX_OFFSET - 1))||,
SUBSTR(IN1.I,Z,20)
END
"FREE DD(INP1)"

9. Suppose i want to code a rexx program in order to get the inputfile and output files of jcl. i want code snippet or the coding for this?

If you know the ddnames of the files being used, then you
can get the infor via the LISTDSI function.
rc = LISTDSI( ddname "FILE")
If the rc = 0 then the dsname is in de variable SYSDSNAME.

If you do not know the ddnames of the files allocated to
your program, you can get the information via TSO with:
Address TSO "LISTA" or Address TSO "LISTA STATUS"

Set up OUTTRAP first so you can capture the output and via
REXX scroll through it.

The difference between LISTA and LISTA STATUS is that LISTA
will only give the datasetnames of all allocated datasets.
LISTA STATUS will give you the ddname followed by all
datasets that are allocated to the ddname for all the
datasets.

10. How to Run My Rexx Exec?

Make sure the Exec starts with the /* REXX */ comment.
TSO EXEC 'hlq.your.dsn(member)' runs Rexx in exactly the
same way as it would a CLIST.
TSO EX yourlib(member) E uses a suffix of EXEC and the TSO
profile prefix to form a full DSN
of 'your_prefix.yourlib.EXEC(member)'
The SYSEXEC concatenation can be used to run execs using
TSO execname. The SYSPROC concatenation will do just as
well, but is really intended for CLISTS.
TSO %execname parameter_string allows you to pass a
parameter string to the exec, note that this string is only
a single argument, not multiple arguments as can be used
when calling from within an exec. The '%' instructs TSO to
not use loadlib concatenations when constructing the search
path.
For running Rexx in batch:

Create a batch environment for the Exec to run in with
PGM=IRXJCL, PGM=IKJEFT01 or PGM=IKJEFT1B
IRXJCL is a straight batch environment
IKJEFT01 and IKJEFT1B are the TSO in batch programs.
Put the Rexx exec libraries in the SYSEXEC DD
concatenation.
Call your exec via the PARM='yourprog' or as input in the
SYSTSIN DD

Download Interview PDF