Page 1 of 1

knowing jobname in TWS

PostPosted: Tue Oct 06, 2015 7:58 pm
by samb01
Hello,

is it possible by rexx, when you arre editing a jcl member in TWS (tivoli), to know the jobname of this member ?

Re: knowing jobname in TWS

PostPosted: Wed Oct 07, 2015 6:57 pm
by NicC
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?

Re: knowing jobname in TWS

PostPosted: Wed Oct 07, 2015 8:29 pm
by samb01
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 ****************************
                                                                               


Re: knowing jobname in TWS

PostPosted: Wed Oct 07, 2015 8:35 pm
by Akatsukami
Have the script or macro parse it out of the first line; it will be from position 3 to just before the first space.

Re: knowing jobname in TWS

PostPosted: Thu Oct 08, 2015 6:09 am
by Pedro
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.

Re: knowing jobname in TWS

PostPosted: Thu Oct 08, 2015 1:33 pm
by samb01
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...

Re: knowing jobname in TWS

PostPosted: Thu Oct 08, 2015 2:23 pm
by BillyBoyo
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.

Re: knowing jobname in TWS

PostPosted: Thu Oct 08, 2015 6:02 pm
by Pedro
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.

Re: knowing jobname in TWS

PostPosted: Fri Oct 09, 2015 1:43 pm
by samb01
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..