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
 

 

Rexx routine which will add the JOBCARD at the begining
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
EnjoyMF

New User


Joined: 27 May 2005
Posts: 88

PostPosted: Thu Jun 07, 2007 11:31 am    Post subject: Rexx routine which will add the JOBCARD at the begining
Reply with quote

Hi All,


Can some one plz provide a rexx routine which will add the JOBCARD at the begining


In my application there is a tool which will generate the JCL automatica rexx procedure which will add the JOBCARD at the beginingclly without the jbocard then we need to add the JOBCARD manually at the begining

Can some one please help we with a REXX routine which will add the jobcard at the begining (some thing like when i open the dataset member and use the REXX routine the jobcard should add at the begining


Thanks n Regards
Prasad
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 07, 2007 12:29 pm    Post subject:
Reply with quote

I usually use an edit macro which does that.

The member $JOBCARD is in the same JCL library as the member being edited - I do this in batch every time that I go to a new site.

And the code is

"ISREDIT COPY $JOBCARD BEFORE 1"

And using further edit commands tailor the jobcard to the standards and specifications of the site that I work at.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Thu Jun 07, 2007 6:18 pm    Post subject:
Reply with quote

Save below in a member of your REXX lib. and just enter that member name while editing a JCL in which you want Jobcard to be entered. Customize it as per your site standards.
icon_smile.gif
Code:
/*  REXX */                                                     
ADDRESS ISREDIT                                                 
'MACRO'                                                         
"LINE_AFTER 0 = '//"USERID()"A  JOB (,,,,),'"           
"LINE_AFTER 1 = '//             xxxxx, '"                       
"LINE_AFTER 2 = '//             CLASS=V, '"                     
"LINE_AFTER 3 = '//             NOTIFY=xxxxxx,      '"           
"LINE_AFTER 4 = '//             MSGCLASS=x'"                   
"LINE_AFTER 5 = '//*  '"                                   
Back to top
View user's profile Send private message
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 190
Location: hyderabad

PostPosted: Fri Jun 08, 2007 6:38 pm    Post subject:
Reply with quote

Hello agkshirsagar

Thanks for the details
but i don't have authoirizations to create a member in the REXX library
hence can i save the code in my own dataset member & execute it


Thanks n Regards
Prasad
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 08, 2007 6:49 pm    Post subject:
Reply with quote

You can create and execute a REXX from your own library if you want to.
Back to top
View user's profile Send private message
EnjoyMF

New User


Joined: 27 May 2005
Posts: 88

PostPosted: Tue Jun 12, 2007 2:21 pm    Post subject:
Reply with quote

Thanks for answering my query in REXX
I need some help from you.
As per our requirement we need to add the JOB Card at the begining of the dataset.The dataset 'UESR.NSW.CNTL(V3511MA8)' will not have the JOB card details and
I had written the REXX code in 'UESR.EM9090.RND(SIVA)' & it is a private library.

How to i execute the REXX routine such that the JOB CARD is appended at the begining


VIEW ,UESR.NSW.CNTL(V3511MA8) - 01.03 ,Spalten,00001,00072,
Befehl ===>, ,Bl{ttern ===>,CSR ,
******,**************************** Datenanfang *******************************
000001,//*********************************************************************
000002,//*
000003,//* IFRS TESTZYKLUS 5 : ULTIMO JUNI (-1) *
000004,//*
000005,//*********************************************************************
000006,//JOBLIB DD DISP=SHR,DSN=UESR.RUP.LOD
000007,// DD DISP=SHR,DSN=UESR.IFRS.LOD
000008,// DD DISP=SHR,DSN=UESR.KVS.LOD
000009,// DD DISP=SHR,DSN=UESR.NSW.LOD
000010,// DD DISP=SHR,DSN=DB3B.ANW.RUNLIB.LOAD

VIEW ,UESR.EM9090.RND(SIVA) - 01.00 ,Spalten,00001,000
Befehl ===>, ,Bl{ttern ===>,CS
******,**************************** Datenanfang ****************************
000100,/* REXX */
000200,ADDRESS ISREDIT
000300,'MACRO'
000400,"LINE_AFTER 0 = '//"USERID()"A JOB (,,,,),'"
000500,"LINE_AFTER 1 = '// XXXXX, '"
000600,"LINE_AFTER 2 = '// CLASS=V, '"
000700,"LINE_AFTER 3 = '// NOTIFY=XXXXXX, '"
000800,"LINE_AFTER 4 = '// MSGCLASS=X'"
000900,"LINE_AFTER 5 = '//* '"
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Tue Jun 12, 2007 2:32 pm    Post subject:
Reply with quote

Code:


/*  REXX */                                                     
ADDRESS ISREDIT                                                 
'MACRO'                                                         
"LINE_AFTER 0 = '//"USERID()"A  JOB (,,,,),'"           
"LINE_AFTER 1 = '//             xxxxx, '"                       
"LINE_AFTER 2 = '//             CLASS=V, '"                     
"LINE_AFTER 3 = '//             NOTIFY=xxxxxx,      '"           
"LINE_AFTER 4 = '//             MSGCLASS=x'"                   
"LINE_AFTER 5 = '//*  '" 



I saved it in my REXX library and when I execute its not adding jobcard to the jcl but the rexx is executing sucessfully
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 12, 2007 2:36 pm    Post subject:
Reply with quote

Your main REXX routine should contain something like

"ISPEXEC EDIT DATASET('dataset name') MACRO('macro name')"

Not 100% sure on the syntax as I don't have MF access until Monday 18th.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Tue Jun 12, 2007 2:41 pm    Post subject:
Reply with quote

What is MACRO name here?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 12, 2007 2:43 pm    Post subject:
Reply with quote

Quote:
What is MACRO name here?


What do you want to call it ?
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Tue Jun 12, 2007 2:53 pm    Post subject:
Reply with quote

I tried this given code

Code:


"ISPEXEC EDIT DATASET('dataset name') MACRO('macro name')"



But its not working.When i execute this its opening my rexx lib say suppose i gave my rexx lib which has some job also.So how to edit there
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 12, 2007 3:15 pm    Post subject:
Reply with quote

Have a read of the fine manual ............

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISPZEM40/CCONTENTS?DT=20050712213335
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Tue Jun 12, 2007 4:42 pm    Post subject:
Reply with quote

Can you please explain me with a code?
No actually my question is why it is not entering a jobcard to my job? icon_confused.gif icon_confused.gif icon_confused.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 12, 2007 4:57 pm    Post subject:
Reply with quote

Why not post exactly what you have coded and then it will be much easier to see what is happening.
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Tue Jun 12, 2007 5:03 pm    Post subject: Re: Rexx routine which will add the JOBCARD at the begining
Reply with quote

hi,

in order to execute your rexx routines, you need to concatinate the PDS where your rexx routines reside with the system libraries..

Please type TSO ISRDDN to list down all your system libraries...


~Vamsi
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Tue Jun 12, 2007 5:07 pm    Post subject:
Reply with quote

This is my modified code

Code:

/*REXX*/

TRACE ALL
 ADDRESS
"ISPEXEC EDIT  DATASET('prem.REXX') MACRO('MACRO')"
ADDRESS ISREDIT 'MACRO'
"LINE_AFTER 0 = '//"USERID()"A  JOB (),'"
"LINE_AFTER 1 = '//             XXXXX, '"
"LINE_AFTER 2 = '//             CLASS=6, '"
"LINE_AFTER 3 = '//             NOTIFY=xxxxxx,      '"
"LINE_AFTER 4 = '//             MSGCLASS=X'"
"LINE_AFTER 5 = '//*  '"



When I execute this code it OPEN'S prem.REXX pds and list all lists all the members when I try to open the member in that lit list.It displays 'MACRO' in the command line and also displays invalid command in the right hand corner.In that edit entry panel

Its like this


Code:


sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
EDIT      PREM.REXX(SORT2) - 01.01          Command name is invalid
Command ===> 'MACRO'                                          Scroll ===> CSR
****** ***************************** Top of Data ******************************
==MSG> -Warning- The UNDO command is not available until you change
==MSG>           your edit profile using the command RECOVERY ON.


where I am trying to add that jobcard in my sort2.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 12, 2007 5:13 pm    Post subject:
Reply with quote

Code:

ADDRESS ISREDIT 'MACRO'
"LINE_AFTER 0 = '//"USERID()"A  JOB (),'"
"LINE_AFTER 1 = '//             XXXXX, '"
"LINE_AFTER 2 = '//             CLASS=6, '"
"LINE_AFTER 3 = '//             NOTIFY=xxxxxx,      '"
"LINE_AFTER 4 = '//             MSGCLASS=X'"
"LINE_AFTER 5 = '//*  '"
"ADRESS ISREDIT END"

Should be in a different member from the main REXX code. The library in which this member exists should also be concatenated into your SYSEXEC statement.

Let us assume that we create this member and call it MACRO99

And the calling code should be something like
Code:

"ISPEXEC EDIT  DATASET('prem.REXX(member)') MACRO('MACRO99')"
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Tue Jun 12, 2007 5:17 pm    Post subject: Re: Rexx routine which will add the JOBCARD at the begining
Reply with quote

that what i was trying to explain!!
u got a message that command not found!!
This is because your TSO Session couldn't locate your REXX macro to add joobcard. U need to concatenate your 'PREM.REXX' library with the system libraries where all other rexx utilities resides..

~Vamsi
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Tue Jun 12, 2007 5:26 pm    Post subject:
Reply with quote

I modified it now and I changed the code accordingly but I get the same error icon_sad.gif icon_sad.gif icon_sad.gif icon_sad.gif icon_sad.gif icon_sad.gif .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 12, 2007 5:29 pm    Post subject:
Reply with quote

Are you running in batch or online ?
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts SORT - E15 and E35 using same user ex... Abhi Nature DFSORT/ICETOOL 12 Mon Oct 03, 2016 4:33 pm


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