IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to pass a value from a REXX program to a SKELETON.


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gcchowdary
Warnings : 1

New User


Joined: 26 Dec 2005
Posts: 18
Location: India

PostPosted: Thu Dec 28, 2006 2:13 pm
Reply with quote

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
View user's profile Send private message
avaneendra_linga

New User


Joined: 13 Dec 2006
Posts: 73
Location: Hyderabad

PostPosted: Thu Dec 28, 2006 2:29 pm
Reply with quote

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
View user's profile Send private message
gcchowdary
Warnings : 1

New User


Joined: 26 Dec 2005
Posts: 18
Location: India

PostPosted: Thu Dec 28, 2006 2:35 pm
Reply with quote

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
View user's profile Send private message
avaneendra_linga

New User


Joined: 13 Dec 2006
Posts: 73
Location: Hyderabad

PostPosted: Thu Dec 28, 2006 2:43 pm
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Dec 28, 2006 3:43 pm
Reply with quote

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
View user's profile Send private message
gcchowdary
Warnings : 1

New User


Joined: 26 Dec 2005
Posts: 18
Location: India

PostPosted: Thu Dec 28, 2006 4:34 pm
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Dec 28, 2006 5:34 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top