knowing jobname in TWS



IBM's Command List programming language & Restructured Extended Executor

knowing jobname in TWS

Postby samb01 » Tue Oct 06, 2015 7:58 pm

Hello,

is it possible by rexx, when you arre editing a jcl member in TWS (tivoli), to know the jobname of this member ?
samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: knowing jobname in TWS

 

Re: knowing jobname in TWS

Postby NicC » Wed Oct 07, 2015 6:57 pm

That is unclear. If you are editing it then I presume you are using the ISPF editor and the first line of a job is the jobcard with the jobname in bytes 3 to (up to) 10. So why is this not sufficient? What are you trying to do that somehow involves rexx?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: knowing jobname in TWS

Postby samb01 » Wed Oct 07, 2015 8:29 pm

Hello,

because i execute a pgm rexx whne i a m editing this job. So the rexx i want to execute doesn't know the name of the job :

Command ===> dfvb  ==> my rexx                                        Scroll ===> CSR 
                                                                               
Edit JCL below and press END to finish or CANCEL to reject:                   
                                                                               
Application           : CPCGEE            01 Ecritures PRCGEM                 
Operation             : PEX2 66           APCDDS                               
Status of operation   : Ended in error    UF00                           
Jobname               : FCVD          JCL last updated by: BGCVFD
                                                                               
****** ***************************** Top of Data ******************************
000001 //FCVDG JOB ,VFC',MSGCLASS=O,MSGLEVEL=1,               
000002 //      CLASS=O                                                         
000005 //S1       EXEC PGM=GCVGFT                                           
000006 //SYSPRINT DD SYSOUT=*                                                 
000007 //ECPCGEE1 DD DSN=AFDQ.&VCFS..HNB(BGVCFM),DISP=SHR                 
000008 //*********************************************************             
****** **************************** Bottom of Data ****************************
                                                                               

samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: knowing jobname in TWS

Postby Akatsukami » Wed Oct 07, 2015 8:35 pm

Have the script or macro parse it out of the first line; it will be from position 3 to just before the first space.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: knowing jobname in TWS

Postby Pedro » Thu Oct 08, 2015 6:09 am

because i execute a pgm rexx whne i a m editing this job.

You did not say much about the rexx, but it needs to use ISPF edit macro statements to work with the data shown by the editor.

As Akatsukami-san has said, your rexx exec needs to locate the job card line and then get the data line from the editor into a rexx variable so you can parse it.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: knowing jobname in TWS

Postby samb01 » Thu Oct 08, 2015 1:33 pm

Heelo,
i would like to avoid it because the the jobname is not always in the fisrt line...But i think i have no choice...
samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: knowing jobname in TWS

Postby BillyBoyo » Thu Oct 08, 2015 2:23 pm

What do you have before the JOB card? It is simple to make a "logical" first line in your code, which will contain the JOB card.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: knowing jobname in TWS

Postby Pedro » Thu Oct 08, 2015 6:02 pm

your rexx exec needs to locate the job card line

Your editor macro can issue:
Address ISREDIT "FIND 'JOB' WORD"

You may need to do additional tests to make sure it is the JOB card; if not, issue the FIND again.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: knowing jobname in TWS

Postby samb01 » Fri Oct 09, 2015 1:43 pm

ok, thank's for your help.
I can see rexx dosen't communicate with TWS... We can't have the jobname, we can have the "Application
name", or the owner.. for example..
samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post