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

New issue while running rexx from jcl


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Mon Apr 23, 2007 11:31 am
Reply with quote

hi,
i had posted a similar query before ..about how to run ispexec commands while running rexx from jcl..i solved that by running a new jcl but that jcl is not running the command
ADDRESS ISPEXEC "FTINCLUDE JCL" command

note::the files JCL and JCL2 in the below code have been allocated to ISPSLIB
why is it so??here is the error which i get
14 *-* UPDATE=NEXT
15 *-* Address ISPEXEC "FTOPEN TEMP"
>>> "FTOPEN TEMP"
16 *-* ADDRESS ISPEXEC "FTINCL "NEXT""
>>> "FTINCL JCL2"
+++ RC(8) +++
17 *-* Address ISPEXEC "FTINCL jcl"
>>> "FTINCL jcl"
+++ RC(8) +++
18 *-* Address ISPEXEC "FTCLOSE"
>>> "FTCLOSE"
19 *-* Address ISPEXEC "VGET (ZTEMPF ZTEMPN) SHARED"
>>> "VGET (ZTEMPF ZTEMPN) SHARED"
20 *-* address tso "submit '"ztempf"'"
>>> "submit 'U150660.SPFTEMP1.CNTL'"
J56265I INPUT DATA SET U150660.SPFTEMP1.CNTL NOT USABLE+
J56265I THE DATA SET IS EMPTY


here is the jcl which im usin sorry its quite big

//COPYPROF EXEC PGM=IEBCOPY
//SYSPRINT DD DUMMY,DCB=(LRECL=121,BLKSIZE=9438,RECFM=FB)
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)
//DDIN DD DSN=U150660.ISPF.ISPPROF,DISP=SHR
//DDOUT DD DSN=&&PROF,DISP=(,PASS),
// UNIT=SYSDA,SPACE=(CYL,(1,1,20),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB)
//SYSIN DD *
COPY INDD=DDIN,OUTDD=DDOUT
/*
//*
//TSOBTCH1 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//ISPLOG DD DUMMY,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129)
//ISPLIST DD DUMMY,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129)
//ISPLST1 DD DISP=NEW,UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//ISPLST2 DD DISP=NEW,UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//ISPILIB DD DSN=ISP.SISPSAMP,DISP=SHR
//ISPPLIB DD DSN=ISP.SISPPENU,DISP=SHR
//ISPMLIB DD DSN=ISP.SISPMENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSENU,DISP=SHR
//ISPTLIB DD DSN=ISP.SISPTENU,DISP=SHR
//ISPPROF DD DSN=*.COPYPROF.DDOUT,DISP=(OLD,DELETE)
//SYSPROC DD DSN=ISP.SISPCLIB,DISP=SHR
//SYSEXEC DD DSN=U150660.IT.ISPSNEW,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//INFILE DD DSN=U150660.REXX.OUTPUT,DISP=SHR
//OUTFILE DD SYSOUT=*
//SYSTSIN DD *
PROFILE PREFIX(U150660)
ISPSTART CMD(%ITUPD)
/*
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Apr 23, 2007 12:56 pm
Reply with quote

Hi!

file tailoring service would like to find the object of the ftinclude in the ISPSLIB concatenation ....

modify Your ispf batch allocation
Code:

//ISPSLIB DD DSN=ISP.SISPSENU,DISP=SHR
//             DD DSN=your.pds.with.skels,DISP=SHR


rergards
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Mon Apr 23, 2007 2:50 pm
Reply with quote

HEY ENRICO
thanks buddy ..u have solved my problem and you have cleared the final bug in a program which has been a frequent question in this forum how to submit job2 afer the successful completion of job1..any users who need a proper soln for this can contact me..i have it ..i have solved it..

please note this .....
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Apr 23, 2007 6:06 pm
Reply with quote

rohitcognizant, maybe you could take a few moments and create a post that explains, for the benefit of all the forum members, why such a concept is a real necessity. There seems to be a real business reason why someone would need to schedule jobs and yet not have job scheduling system available.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Tue Apr 24, 2007 1:50 pm
Reply with quote

hi superk

this was just an assignment i did..this method could be used for integration testing..am i right????
Back to top
View user's profile Send private message
bhushan munot

New User


Joined: 18 Apr 2007
Posts: 7
Location: pune

PostPosted: Tue Apr 24, 2007 5:33 pm
Reply with quote

hi rohit,
thanks for giving rexx program for sub 2 jobs one after another.
but i want to sub a single job at 12.00 am also i didn't want to
stay at night.
is there any way to do so.
i heard about REXX sleep command do the same. but i didn't know
the REXX , can u provide me the syntax of sleep command of REX
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 24, 2007 5:48 pm
Reply with quote

Quote:
i heard about REXX sleep command do the same. but i didn't know
the REXX , can u provide me the syntax of sleep command of REX

So you want to hog an initiator for however long it takes to allow your job to run on time. What about anyone else that might want to use that resource ?

The usual suspects -
a) Do you have a schedule package that can be utilised
b) If not, what is the requirement that your job must run at this time.
c) Can you not post process at a later time, using the desired date/time as a cutoff.

I am not sure on this point, but as you probably need to run this under a batch TSO session, I was wondering if the TSO session timeout limit may apply to your job. i.e. it remains inactive for the time specified by your systems programmers, so gets killed off.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Apr 24, 2007 7:19 pm
Reply with quote

This previous topic might provide what you want to do, as long as you can issue MVS/JES console commands.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Sat May 12, 2007 12:43 pm
Reply with quote

Just a Thank you note.

I was getting below error message and tried all possible solution given in this forum but the code was failing with RC 998.

Code:
 ISPT015 BLDL/FIND error         -/-ISPDTFRS received return code


But after looking at above JCL I modified my JCL to copy the ISPFPROF and the Job executed succesfully.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Tue May 15, 2007 4:02 pm
Reply with quote

hi
please read my first post before answering this..
i submitted a job jcl2 through a jcl...then there is some problem with the skelton file userid().spftemp.cntl....im not able to deallocate it inspite of using free command...
this is the output i get in the spool on submitting the second job jcl2


ISPF system data set allocation error - press Enter to continue.
Temporary control card data set cannot be allocated.
Data set 'U150660.SPFTEMP1.CNTL' in use by another user, try later.
IKJ56709I INVALID DATA SET NAME, ''
IKJ56701I MISSING DATA SET NAME OR *+
IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED
IKJ56247I FILE DELT NOT FREED, IS NOT ALLOCATED
ISPF system data set allocation error - press Enter to continue.
Temporary control card data set cannot be allocated.
Data set 'U150660.SPFTEMP1.CNTL' in use by another user, try later.
ISPF102 No work file -/-Work file not open.
READY
END

the file 'U150660.SPFTEMP1.CNTL' was freed but its not working ..i did it like this

NEXT=JCL2
Address ISPEXEC "VGET (ZTEMPF) SHARED"
ADDRESS TSO "ALLOC DA('"ZTEMPF"') DD(DELT) SHR REU"

ADDRESS TSO "FREE DD(DELT)"
Address ISPEXEC "FTOPEN TEMP"
ADDRESS ISPEXEC "FTINCL "NEXT""
Address ISPEXEC "FTINCL jcl"
Address ISPEXEC "FTCLOSE"
Address ISPEXEC "VGET (ZTEMPF ZTEMPN) SHARED"
address tso "submit '"ztempf"'"
SAY 'ZTEMPF= ' ztempf
ADDRESS TSO"ALLOC DA('"ZTEMPF"') DD(DELT) SHR REU"
"FREE DD(DELT)"
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 15, 2007 4:15 pm
Reply with quote

Aaaaaaaaaaaaaaaaaaargh, I can not remember the DD name of the file tailoring output file, I think it's ISPFILE, but usually I will allocate that DD name with my own dataset, and can free it up and delete it at will, without it being allocated to anything other than the process running.

Check out the DD name, and give it a try. I do not have MF access today.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Tue May 15, 2007 5:00 pm
Reply with quote

HI EXPAT
THE name of the filetailoring outputfile is userid.SPFTEMP1.CNTL .i tried allocating it to a dd name and frreing it..but the outcome was the same..wot is the "ispf 102 no workfile open" shown in the error messages
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 15, 2007 5:02 pm
Reply with quote

What I meant was to allocate DD name ISPFILE with your own dataset name, uid.JCL.SUBMIT or something.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Tue May 15, 2007 5:32 pm
Reply with quote

should i do it in the rexx or jcl
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Tue May 15, 2007 5:35 pm
Reply with quote

and should i use that dd name ISPFILE instead of TEMP in"ftopen temp"
to submit the job???
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 15, 2007 5:40 pm
Reply with quote

If you use ISPFILE (I think) as the output from the File Tailoring, you can SUBMIT 'dataset name' and then free the DD name and delete the DSN after submitting.

I usually keep a unique DSN for file tailoring in batch. Makes life easier.

FREE FI(ISPFILE)
ALLOC FI(ISPFILE) blah blah blah
....
FTINCL whatever
FTCLOSE

SUBMIT 'whatever you called it'
FREE FI(ISPFILE)
DELETE 'whatever you called it'
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Tue May 15, 2007 6:12 pm
Reply with quote

ru sure that ispfile is the dd name ???bcause i tried allocating "ztempf" with the ddname ispfile and freeing it..but it did not work
this is the code .ztempf contains the file='USERID.SPFTEMP1.CNTL'

ADDRESS TSO"ALLOC DA('"ZTEMPF"') DD(ISPFILE) SHR REU"
"FREE DD(ispfile)"
it showed the same output


ISPF system data set allocation error - press Enter to continue.
Temporary control card data set cannot be allocated.
Data set 'U150660.SPFTEMP1.CNTL' in use by another user, try later.
IKJ56709I INVALID DATA SET NAME, ''
IKJ56701I MISSING DATA SET NAME OR *+
IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED
IKJ56247I FILE DELT NOT FREED, IS NOT ALLOCATED
ISPF system data set allocation error - press Enter to continue.
Temporary control card data set cannot be allocated.
Data set 'U150660.SPFTEMP1.CNTL' in use by another user, try later.
ISPF102 No work file -/-Work file not open.
READY
END

the file 'U150660.SPFTEMP1.CNTL' was freed but its not working ..i did it like this
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 16, 2007 12:46 pm
Reply with quote

Try something like this

ADDRESS TSO"ALLOC DA('"uid.JCL.SUBMIT"') DD(ISPFILE) NEW TRACKS SPACE(5 5) RECFM(F B) LRECL(80)"
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Wed May 16, 2007 1:07 pm
Reply with quote

hi
thanks expat ur idea worked like a charm..the previous reply was enough actually...the previous replies by me and you were send almost at the same time ..thanks a lot
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 16, 2007 3:01 pm
Reply with quote

Thanks for letting us know it worked icon_smile.gif
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
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 SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top