View previous topic :: View next topic
|
Author |
Message |
gcchowdary Warnings : 1 New User
Joined: 26 Dec 2005 Posts: 18 Location: India
|
|
|
|
I want to pass data,say a dataset name from a REXX program to a SKEL.
Here i don't want to hardcode the JCL in the REXX program. Please give me any suggestion.
Thank You...
G C Chowdary |
|
Back to top |
|
|
avaneendra_linga
New User
Joined: 13 Dec 2006 Posts: 73 Location: Hyderabad
|
|
|
|
hi,
you can pass the values using variables. in skels we can use variable as
with '&' .
EXAMPLE:
IN REXX:
DSNAME='A.B.C'
IN SKELS:
DSN=&DSNAME,DISP=SHR |
|
Back to top |
|
|
gcchowdary Warnings : 1 New User
Joined: 26 Dec 2005 Posts: 18 Location: India
|
|
|
|
Thanks for your reply. Do i need to incude the dataset where the JCL is present, in the REXX program using FTINCL.
If so can you please give the full syntax.
Thanks in advance...
G C Chowdary |
|
Back to top |
|
|
avaneendra_linga
New User
Joined: 13 Dec 2006 Posts: 73 Location: Hyderabad
|
|
|
|
hi,
in the following code jcl named jclmem will created in JCLDD library.
dsname='a.b.c'
address ispexec
"FTCLOSE"
"FTOPEN"
frc = rc
if frc \= 0 then
do
say "S--> FTOPEN FAILED ...RC = " frc
signal ABNORMAL_EXIT
end
skelname= "jclskel"
address ispexec
"FTINCL "skelname
frc = rc
if frc \= 0 then
do
say "S--> FTINCL FAILED for "skelname" ...RC = " frc
say "Error : " zerrsm
say "Error : " zerrlm
signal ABNORMAL_EXIT
end
memname='jclmem'
address ispexec
"FTCLOSE name(avani) library(jcldd)"
frc = rc
if frc \= 0 then
do
say "S--> FTCLOSE FAILED ...RC = " frc
say zerrsm
say zerrlm
signal ABNORMAL_EXIT
end |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
By using the file-tailoring-services, the variables of the skeleton jcl are
automaticly replaced with the content of the rexx or clist yariables with the same name.
Regards, UmeySan |
|
Back to top |
|
|
gcchowdary Warnings : 1 New User
Joined: 26 Dec 2005 Posts: 18 Location: India
|
|
|
|
Hi All
Linga, thanks a lot for your help.
UmeySan,
How can I use File-tailoring.Can you give a example.
Thanks....
G C Chowdary. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
The answer above mine was about file-tayloring. -> "FTINCL" skelname.
Little example: This rexx is displaying a panel, then the skeleton is
included, saved in a library as a member and then displayed in EditMode for edit & submit. The jcl variables are substituted by file-tayloring automatically.
ADDRESS ISPEXEC "ADDPOP"
ADDRESS ISPEXEC "DISPLAY PANEL(UMKTOID1)"
IF RC > 0 THEN DO
RETURN
END
ADDRESS ISPEXEC "VGET (UINR,UKNR, UDB2) PROFILE"
TEMPDSN = "IER1337.USER.JCL.S000"
TEMPJOB = "SELKTOID"
ADDRESS TSO "ALLOC F(ISPFILE) DSN('"TEMPDSN"') SHR REUS"
ADDRESS ISPEXEC "FTOPEN "
ADDRESS ISPEXEC "FTINCL UMDBKTID"
ADDRESS ISPEXEC "FTCLOSE NAME("TEMPJOB")"
ADDRESS ISPEXEC "EDIT DATASET ('"TEMPDSN"("TEMPJOB")'"
ADDRESS TSO "FREE F(ISPFILE) "
ADDRESS ISPEXEC "REMPOP"
EXIT
Here is the Skel:
//STEP010 EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//*
//SYSTSIN DD *
DSN SYSTEM(&UDB2.)
RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) -
PARMS('NOCOUNT/')
//SYSIN DD *
SELECT DISTINCT VE.VE_ID
FROM S&UINR..VE_DARL VE
JOIN S&UINR..GRUNDKONTO GK
ON GK.KONTO_ID = VE.VE_ID
WHERE GK.KONTONR = &UKNR.
;
//*
Regards, good luck & happy new year
UmeySan |
|
Back to top |
|
|
|