All good ideas.

This is mainly for the programmers convenience, so that don't have to type a job name when sbmjob and testing.



Would a routing entry work, similar to the one for S/38.

Start

Opt Seq Nbr Program Library Compare Value Pos

5 QCMD QSYS 'BATCH_P' 1

10 YBRTPRC Y1SY 'YCRTOVR' 1

11 YBRTPRC Z1SY 'ZCRTOVR' 1

12 YBRTPRC B1SY 'BCRTOVR' 1

300 QCMD QSYS 'QS36EVOKE' 1

700 QCL QSYS 'QCMD38' 1

9999 QCMD QSYS *ANY



Also found a solution for queries last year, data area (QQUPRFOPTS)
JOB parameter for SBMJOB

6-15

10-Character name associated with the batch job. Special allowed values are:

*JOBD - The job description name is used.

*QRY - The query definition named is used.










-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Wednesday, November 13, 2013 2:49 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Submitted job "job name" default to program name



On 13-Nov-2013 11:16 -0800, Steinmetz, Paul wrote:

Is there a way to have a submitted job "job name" to default to the

program name?

Currently, from the help text, I only see two options.

The default is *JOBD, which is almost useless.



*JOBD

The simple name of the job description used with this job is the

name of the job itself.



name

Specify the simple name of the job that is used while it is being

processed by the system.





The SBMJOB command starts a /request/ [i.e. RQSDTA()] or a /command/ [i.e. CMD()]. The Submit Job (SBMJOB) command does not start a /program/ by name; the request or command would be a command string in the form of 'CALL PGM(pgm_name) PARM(...)'. If submitting the request to invoke the program is being made from a CLP, for example, the effect is easy enough by coding the program name to come from a variable, and using that variable on both the submitting and the submitted commands:

SBMJOB CMD(CALL PGM(&PGM_NAME)) JOB(&PGM_NAME)



Otherwise a custom version of the SBMJOB command [e.g. named SBMPGM] that would invoke a CPP that is designed to parse the CMD string [and if a RQSDTA is also allowed, then that instead, if required]. That command could omit any support for a JOB() parameter, or just add a new special value of *CALLEDPGM [optionally as the default]. That CPP would then issue the request as:

QSYS/SBMJOB CMD(&THE_CMD) JOB(&PARSED_PGM) ...



However the above technique has long been possible to be replaced by an API to avoid or reduce the complexity. There are probably some decent enough examples that can be found that use the Replace Command Exit Program (QCARPLCM) API, such that in conjunction with parsing of the /command string/ to obtain the PGM() specification of the CALL command, the JOB() parameter specification of the SBMJOB request could be added or updated to reflect the named /program/ (PGM) from the CALL coded in the request data (RQSDTA) or the command (CMD) parameter.



http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/apis/qcarplcm.htm

_i Replace Command Exit Program (QCARPLCM) API i_ "...

The Replace Command Exit Program (QCARPLCM) API may be used as the exit program for the QIBM_QCA_CHG_COMMAND for any command. If the original command was library-qualified with *SYSTEM or *NLVLIBL, the library qualifier will be replaced with *LIBL. None of the parameter values specified on the original command will be changed. ...

..."



--

Regards, Chuck

--

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list

To post a message email: MIDRANGE-L@xxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxx>

To subscribe, unsubscribe, or change list options,

visit: http://lists.midrange.com/mailman/listinfo/midrange-l

or email: MIDRANGE-L-request@xxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxx>

Before posting, please take a moment to review the archives

at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.