On 5/8/2018 12:50 PM, Jake Anderson wrote:
Lizette,

We are using EJES. I think it has its own rexx interface.

So finding a way to know the destination based on first character of a
Jobname.

Listing the destination for each job whose name starts with $ is trivial in (E)JES. You don't even need a REXX. This simple batch job will create a report in a SYSOUT data set showing job name, job id, owner, and destination:

//LIST$    JOB 1,JAFFE,CLASS=A,MSGCLASS=T,NOTIFY=&SYSUID
//EJES     EXEC PGM=EJESLNK
//EJESOUT  DD DUMMY,RECFM=VB,LRECL=84,BLKSIZE=88
//EJESEXT  DD SYSOUT=*
//EJESIN   DD *
 PRESET;JNAME $*;STATUS;SHOW JNAME JID OWNER PRTDEST;UPDATE
 EXTRACT FIRST LAST
//

The report looks like this in my environment:

STATUS - 3040S- 0X- 9W- 0H- 0T- 0 Records -------------------------- Row 1 to 9
JobName  JobID    Owner    PrtDest
-------- -------- -------- -----------------
$EDSQ001 S0007202 SYSOPER  LOCAL
$EDSQ002 S0007204 SYSOPER  LOCAL
$EDSQ003 S0007206 SYSOPER  LOCAL
$EDSQ004 S0007208 SYSOPER  LOCAL
$EDSQ005 S0008532 SYSOPER  LOCAL
$EDSQ006 S0008534 SYSOPER  LOCAL
$EDSQ007 S0008536 SYSOPER  LOCAL
$EDSQ008 S0008538 SYSOPER  LOCAL
$MASCOMM S0000001 SYSOPER  LOCAL

If you want to use REXX instead, you could author something like this:

/* REXX */
  rc=ejesrexx("EXECAPI * 'PRESET;JNAME $*;STATUS' (prefix _ term")
  say "JobName  JobId    Owner    PrtDest"
  do i=1 to _Lines
    say LEFT(_TCData.__JNAME.i,8) LEFT(_TCData.__JID.i,8) ,
        LEFT(_TCData.__OWNER.i,8) _TCData.__PRTDEST.i
  end

Executing this under my TSO userid yields the following:

JobName  JobId    Owner    PrtDest
$EDSQ001 S0007202 SYSOPER  LOCAL
$EDSQ002 S0007204 SYSOPER  LOCAL
$EDSQ003 S0007206 SYSOPER  LOCAL
$EDSQ004 S0007208 SYSOPER  LOCAL
$EDSQ005 S0008532 SYSOPER  LOCAL
$EDSQ006 S0008534 SYSOPER  LOCAL
$EDSQ007 S0008536 SYSOPER  LOCAL
$EDSQ008 S0008538 SYSOPER  LOCAL
$MASCOMM S0000001 SYSOPER  LOCAL
***
If you have additional questions, please contact Phoenix Software Technical Support via [email protected].

Thanks,

--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
http://www.phoenixsoftware.com/
--------------------------------------------------------------------------------
This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to