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

how to invoke a job through REXX..


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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Nov 06, 2009 1:14 pm
Reply with quote

I Expat, my post was not meant to criticize icon_biggrin.gif
just a quick copy and paste from an older post of mine
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Nov 06, 2009 1:23 pm
Reply with quote

Absolutely no offence taken icon_lol.gif

I just thought that it might help those who may have noticed a difference in the two methods shown to understand the difference between the two ways.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Nov 06, 2009 1:29 pm
Reply with quote

Hi expat! I am pretty sure that in this moment in the TS organization there is somebody else facing the same issue,
and it will solve it in a different an possibly most inefficient/ineffective way

/rant on( cut and paste from a post I just submitted about data sets listings )
General consideration on
Yess... everybody is reinventing the wheel icon_evil.gif
... snipped
The general tone of the posts suggests that support in the organization where the TS(Topic Starters) work
is pretty incompetent/ignorant/lazy/<add as many derogatory adjectives as You like>
same applies to the management
the usual approach in any decently managed organization
is to provide the end users with the most common and proper
tools/<how to's>/<code-jcl snippets>/pointers to the manuals
to enable them to carry on the most common tasks respecting the organization standards and practices
...

but obviously the people asking for help around here are not the <poor souls > end users,
but the support itself icon_biggrin.gif icon_biggrin.gif
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Fri Nov 06, 2009 1:37 pm
Reply with quote

expat i am getting below jcl error for the code as suggested by you :


CHARACTER '&' IS NOT VALID AT THE START OF TEMPORARY DATA SET
NAME '&&TEMP'.





Thanks,
Mukesh.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Nov 06, 2009 2:30 pm
Reply with quote

Hi Enrico, I guess it's a case of get it done somehow, done quickly, and let the client pay for it.

Oh for the days of everything going through proper testing and evealuation processes where the experienced people picked up on bad practices and educated the wrong doers.

Mukesh, post the sysout, I am not really psychic
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Fri Nov 06, 2009 2:44 pm
Reply with quote

expat.. i am trying to develop the tool for my own learning...

please find below the jesysmsg ... no sysout is getting generate .. jcl error.




STMT NO. MESSAGE
7 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD
11 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD
14 IEFC001I PROCEDURE F3698MAL WAS EXPANDED USING SYSTEM LIBRARY SYSCMN.P


Thanks,
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Nov 06, 2009 3:16 pm
Reply with quote

The JESJCL segment would be helpful
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Fri Nov 06, 2009 3:44 pm
Reply with quote

&&&&TEMP in the jcl is giving error.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Nov 06, 2009 3:53 pm
Reply with quote

expat wrote:
The JESJCL segment would be helpful
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Fri Nov 06, 2009 3:55 pm
Reply with quote

REXX :

000100 /* REXX */
000200 /* SUBMITTING JOB THROUGH REXX */
000300 SAY 'ENTER QUALIFIER(EG:F3698 ) :'
000400 PULL TEST
000401 "ISPEXEC FTOPEN"
000402 "ISPEXEC FTINCL TEST99"
000403 "ISPEXEC FTCLOSE"
000410 ADDRESS TSO "SUBMIT '"Z1225AN.EM"("SAREX")'"

JCL :

//SAREXTR EXEC PGM=SARBCH,
// PARM='K9490P0.SAR41,&TEST'
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//REPORT DD DSN=&&&&TEMP,
// DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(20,10),RLSE),
// LRECL=133,RECFM=FBA,BLKSIZE=27930
//SYSIN DD *
/LIST ID=&&TEST*,GEN=0
/*
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&&&TEMP,DISP=SHR
//SORTOUT DD DSN=Z1225AN.PRODJOBS,
// DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(20,10),RLSE),
// LRECL=133,RECFM=FBA,BLKSIZE=27930
//SYSIN DD *
SORT FIELDS=(40,3,CH,A,65,10,CH,A)
INCLUDE COND=(116,4,CH,GT,C'0004')
SUM FIELDS=NONE
OUTREC FIELDS=(2:35,8,11:44,8,20:65,10,31:76,5,37:116,4)
/*

...
...
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Nov 06, 2009 4:29 pm
Reply with quote

expat wrote:
expat wrote:
The JESJCL segment would be helpful

Oh boy, perhaps a different approach is needed here 12.gif

Where do I start. Maybe you did not read or possibly understand my little banter with Enrico, or just plain chose to ignore it, here is the full code that should be used when using FTOPEN rather than FTOPEN TEMP.

Do you remember me talking about an ISPFILE.

So, here below, untested I may add, is just a snippet of code to hopefully see what happens. Now, I don't know if you have placed the ISPF skeleton code into an ISPF concatenated ISPSLIB dataset, so have included the LIBDEF statements as a precaution.

What this should do is to perform the file tailoring and then display the results upon your screen rather than submit the generated job.

Code:
/* REXX *** SUBMITTING JOB THROUGH REXX */

SAY 'ENTER QUALIFIER(EG:F3698 ) :'
PULL TEST

SYSUID = STRIP(SYSVAR(SYSUID))

"ISPEXEC LIBDEF ISPSLIB DATASET ID()"                                 
"ISPEXEC LIBDEF ISPSLIB DATASET ID('ISPF skeleton library')" STACK

"FREE FI(ISPFILE)"
"DEL '"SYSUID".ISPFILE'"
"ALLOC FI(ISPFILE) DA('"SYSUID".ISPFILE') NEW TRACKS
   SPACE(1 1) RECFM(F B) LRECL(80)"

"ISPEXEC FTOPEN"
"ISPEXEC FTINCL TEST99"
"ISPEXEC FTCLOSE"

"ISPEXEC EDIT DATASET('"SYSUID".ISPFILE')"
/*  "SUBMIT '"SYSUID".ISPFILE'"  */

"FREE FI(ISPFILE)"
"DEL '"SYSUID".ISPFILE'"

"ISPEXEC LIBDEF ISPSLIB DATASET ID()"
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Fri Nov 06, 2009 5:10 pm
Reply with quote

expat..... thanks for the code.. i think it will meet my requirement.let me try to implement my requirement. i will be back if i find any difficulty.




Thanks,
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 Goto page Previous  1, 2

 


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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top