Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 743
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: 743
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us