View previous topic :: View next topic
Author
Message
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello,
Please refer to the posts Marso and Expat have made. . .
To show screen data, simply use copy/paste and the Code tag. Then Preview what you have to see it as it will appear to the forum.
Please re-post the last bits of info and i'll remove the .jpg images.
Back to top
Pedro Global Moderator Joined: 01 Sep 2006Posts: 2547 Location: Silicon Valley
Look at the ISPF Services manual and compare VGET SHARED with VGET PROFILE.
Back to top
Srinivasarangam Warnings : 1 New User Joined: 01 Jun 2010Posts: 39 Location: India
Hi Dick,
Please remove the jpg that I have attached. I am able to get the jcl thru rexx but facing problem in passing the dataset name to jcl skelton. Please find the below code and guide me how to proceed on this.
Code:
Panel code:
)ATTR
# TYPE(TEXT) SKIP(ON)
$ TYPE(TEXT) SKIP(ON) INTENS(LOW) COLOR(YELLOW)
! TYPE(INPUT) CAPS(ON) JUST(LEFT) PAD(NULLS) INTENS(LOW)
¢ TYPE(OUTPUT) CAPS(ON) JUST(LEFT) PAD(' ')
)BODY WINDOW(74,18) EXPAND(\\)
$ CDL PAL Verification
%
%
% 1 Extract 6000 / CDL 2300
% 2 Extract 6000 / PAL 3700
% 3 Extract 6000 / CDL 2300 / PAL 3700
%
% Please enter your option :!Z$
% Compare Invoice Y/N :!Z$
% Environment DEVL(D)/SYSI(S)/QA(Q)/PROD(P) :!Z$
% Extract file:!Z $
% PAL file :!Z $
% CDL file :!Z $
%
%Message --->+!Z $<-
%
%
% <PF3>+EXIT, %<ENTER>+PROCESS
)INIT
.ZVARS = '(OPTION INVOICE,ENVRN,INPUT1,INPUT2,INPUT3,EMSG)'
.CURSOR = 'OPTION'
)PROC
VER(&OPTION,NB,LIST,1,2,3)
VER(&INVOICE,NB,LIST,Y,N)
VER(&ENVRN,NB,LIST,D,S,Q,P)
IF (&OPTION = 1)
VER(&INPUT1,NB,DSNAME)
VER(&INPUT3,NB,DSNAME)
IF (&OPTION = 2)
VER(&INPUT1,NB,DSNAME)
VER(&INPUT2,NB,DSNAME)
IF (&OPTION = 3)
VER(&INPUT1,NB,DSNAME)
VER(&INPUT2,NB,DSNAME)
VER(&INPUT3,NB,DSNAME)
)END
Code:
Rexx cosde
/* rexx */
trace on
/* +++++++++++ TESTING ++++++++++++++ */
panellib = 'tshrpd.p54gz6.rexx.panel'
clistlib = 'tshrpd.p54gz6.rexx.clist'
trace on
address ISPEXEC
"control errors return"
sysenv = sysvar('sysenv')
sysuid = sysvar('sysuid')
address TSO "ALTLIB ACTIVATE APPLICATION(EXEC) DSN('"clistlib"')"
if (rc ¬= 0) then do
say 'ALTLIB ACT failed, rc='rc
exit 99
end
"LIBDEF ISPPLIB DATASET ID('"panellib"')"
ispskel = 'TSHRPD.P54GZ6.REXX.ISPSLIB'
"LIBDEF ISPSLIB DATASET ID('"ispskel"')"
/* ------------------------------------------------------------ */
ARG OPTION INVOICE ENVRN INPUT1 INPUT2 INPUT3 EMSG
ADDRESS ISPEXEC
EMSG = ''
"DISPLAY PANEL(TEST1V)"
if rc \= 0 then exit
IF ZENVRN == 'D' & (SUBSTR(INPUT1,1,7) \= 'TSHRCI.') THEN
DO
SAY 'DATASET NAME SHOULD START WITH TSHRCI'
EXIT
END
"ispexec ftopen temp"
"ISPEXEC ftincl testjcl"
"ispexec ftclose"
ADDRESS ISPEXEC "EDIT DATASET ('"ISPSKEL"("TESTJCL")'"
ADDRESS TSO "FREE F(ISPFILE) "
ADDRESS ISPEXEC "REMPOP"
exit
/* end rexx */
Jcl Skelton
Code:
//P54XXXX JOB (CMP01),'P54G73',
// CLASS=1,MSGCLASS=X,NOTIFY=&SYSUID
//JOBLIB DD DSN=TSHRPD.PAL.LOADLIB,DISP=SHR
//*************************************************************
//PS01 EXEC PGM=ITPCMP2,PARM=XX
//CDL DD DSN=&INPUT3,
// DISP=SHR,DCB=BUFNO=30
//PAL DD DSN=&INPUT2,
// DISP=SHR,DCB=BUFNO=30
//BILEXT DD DSN=&INPUT1,
// DISP=SHR,DCB=BUFNO=30
//OUTREP DD DSN=PSHRPD.PALCDL.REPORT,
// DISP=NEW
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD DSN=DUMMY
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//*----------------------------------------------------*
//* SEND EMAIL WITH REPORT *
//*----------------------------------------------------*
//PS02 EXEC PGM=IKJEFT01,COND=(0,NE)
//SYSEXEC DD DISP=SHR,DSN=SYS4.CLIST
// DD DISP=SHR,DSN=PSHRPD.PROD.CNTLLIB
//DATASET DD DSN= PSHRPD.PALCDL.REPORT,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%XMITIP (USERID@NAMEDCO.MSX.MEDCOHEALTH.COM -
EOBNOTICE@MEDCO.COM) -
NOMSG FILEDD (DATASET) -
SUBJECT 'RE: PAL/CDL REPORT' -
FROM MEDDEOBDEVTEAM@NAMEDCO.MSX.MEDCOHEALTH.COM -
MSGT "PLEASE FIND ATTACHED PAL/CDL VERIFICATION REPORT"
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
Ho hum.
You are using a TEMPORARY outfile from your FT process, so why do you want to look at the ISPSLIB library.
Try this.
Code:
"ISPEXEC VGET (ZTEMPF,ZTEMPN)"
"ISPEXEC EDIT DATASET('"STRIP(ZTEMPF)"')"
Back to top
Srinivasarangam Warnings : 1 New User Joined: 01 Jun 2010Posts: 39 Location: India
Is there any method in rexx which is similar to reference modification in cobol. I want to move option(1 or 2) and invoive(y or n) to PARM in jcl. how to achive that. I tried using substr, but I am getting spaces in parm field.
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
Srinivasarangam,
debugging REXX scripts with TRACE ?R is almost easier than
any IDE on the toy machines.
you can enter commands, you can modify commands
for instance:
you have a substr which is moving spaces in the parm field
(other than the obvious, which is that you have not bothered to really learn how to use the substr command - which is the same as reference mod in cobol)
so, your substr command is picking up the wrong byte,
during a TRACE ?R run,
you will see the results of your substr command.
if it does not address the correct byte,
you have the opportunity to reenter the command, with a modification,
and execute that. then you will see what you have to change in your
script.
besides, you have no substr command in the rexx scripts that you have shown us.
and it is TRACE ?R , not TRACE ON............................
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
Srinivasarangam,
another thing.
substr returns a value; you don't use it to move something somewhere.
say you have a variable - oldvar containing: 'abcefg'.
you want to have 'abcdefg'.
so;
oldvar = substr(oldvar,1,3) || 'd' || substr(oldvar,4,3)
oldvar will now have 'abcdefg'.
it does not work like the mid function of visual basic.
you have to concatenate - || - your sub-strings.
I apologize if I misslead you with my previous post.
Back to top
Srinivasarangam Warnings : 1 New User Joined: 01 Jun 2010Posts: 39 Location: India
Dick Brenholtz ,
Ur suggestion and guidelines solved my problem.
Thank you very much
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
glad that I was able to help.
Back to top
Srinivasarangam Warnings : 1 New User Joined: 01 Jun 2010Posts: 39 Location: India
I am trying to pass the below from rexx code to jcl
Code:
Rexx Code:
EXTRA1 = '@NAMEDCO.MSX.MEDCOHEALTH.COM'
UID = USERID()
USER1 = UID
USER2 = SUBSTR(USER1,1,6) || SUBSTR(EXTRA1,1,28)
jcl code
//SYSTSIN DD *
%XMITIP (&USER2 -
EOBNOTICE@MEDCO.COM ) -
But I am facing problem in moving the above one. I think this becaue of the special charcter I used in the code. Could you please how to achive that
Back to top
Srinivasarangam Warnings : 1 New User Joined: 01 Jun 2010Posts: 39 Location: India
when I do trace i , I am finding that user2 is populated properly.. but the same is not coming to jcl(rexx invoked jcl). Please help me to move further
Back to top
Pedro Global Moderator Joined: 01 Sep 2006Posts: 2547 Location: Silicon Valley
Quote:
I am finding that user2 is populated properly
Are you sure? Because you do not show how 1) how you assign a value to it and 2) how you get the parameter in rexx.
Please show more detail.
You may want to read the rexx reference manual. Read about the PARSE instruction.
Back to top
Srinivasarangam Warnings : 1 New User Joined: 01 Jun 2010Posts: 39 Location: India
Thank you all. My code is working successfully in production. I got many appriciation for completing tool successfully. Thank you for all your supprot.
Thank You Very Much....
Back to top
Please enable JavaScript!