Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to pass a value from a REXX program to a SKELETON.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to pass a value from a REXX program to a SKELETON.
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    Post subject: Re: How to pass a value from a REXX program to a SKELETON.
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    Post subject:
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    Post subject: Re: How to pass a value from a REXX program to a SKELETON.
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: 757
Location: Germany

PostPosted: Thu Dec 28, 2006 3:43 pm    Post subject:
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    Post subject:
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: 757
Location: Germany

PostPosted: Thu Dec 28, 2006 5:34 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us