× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 14-Jan-2016 14:51 -0700, Aaron Bartell wrote:
I am trying to configure nginx to automatically start when the
QHTTPSVR subsystem is started and have been following this(n1)
ITJungle Joe Hertvik tutorial.

Here's what I've done:
CRTJOBD JOBD(QGPL/NGINX) RQSDTA('QSH CMD(''/opt/freeware/sbin/nginx
-c /www/myserver/conf/nginx.conf'')') JOBQ(QHTTPSVR/QZHBHTTP)
USER(MYUSER)

ADDAJE SBSD(QHTTPSVR/QHTTPSVR) JOB(NGINX_LS) JOBD(QGPL/NGINX)

ADDRTGE SBSD(QHTTPSVR/QHTTPSVR) SEQNBR(11) CMPVAL(*ANY) PGM(*RTGDTA)
CLS(QGPL/QBATCH)

Caution: *RTGDTA [as a redirect to the Routing Data] is close in appearance, but quite different from meaning\function of the what the value *RQSDTA [as a redirect to the Request Data] would imply [if that special value had been allowed in that context].


ENDSBS SBS(QHTTPSVR) OPTION(*IMMED)

STRSBS SBSD(QHTTPSVR/QHTTPSVR)

The tutorial only took me through the CRTJOBD and ADDAJE command.
Then I got a routing entry mismatch error so I did the ADDRTGE
command and that fixed it.

An alternative would have been to ensure the specified Routing Data (RTGDTA) referenced an exiting Routing Entry; i.e. specified a value compatible with the Compare Value and Start Position already defined in an existing Routing Entry for that Subsystem Description (SBSD).

Now I am getting the below error and am unsure what I should do
because I *thought* it would invoke the command specified in the
CRTJOBD RQSDTA, but it is trying to find a *PGM.

The error is per trying to find the program per the PGM(*RTGDTA) on the ADDRTGE request; given no program name was offered in the Routing Data, none can be found -- further explained later.


5770SS1 V7R2M0 140418 Job Log MYSYS1 01/14/16 16:42:54 EST Page 1
Job name . : NGINX_LS User . . . : MYUSER Number . . : 024348
Job description . : NGINX Library . . : QGPL
MSGID TYPE SEV DATE TIME FROM PGM
LIBRARY INST TO PGM LIBRARY INST
CPC1116 Completion 50 01/14/16 16:42:54.383665 QWTMMERH
QSYS 00D3 *EXT *N
From user . . . : QSYS
Message . : CPC1116 Program in library not found.
Recovery . . . : Do one of the following and try the request again:
-- Create the program. -- Change the library or program name in the
routing entry (CHGRTGE command). -- Change the library or program
name on the program start request.

n1 - http://www.itjungle.com/fhg/fhg031605-story03.html

For the record, I did not [visit nor] read the story.


Thoughts?


The Add Routing Entry (ADDRTGE) shown, asks that the program named in the Routing Data should be invoked when the job starts. The Create Job Description (CRTJOBD) did not specify any Routing Data (RTGDTA); when not specified in the creation of Job Description (JOBD), the default is : RTGDTA(QCMDI)

Note: Program To Call (PGM) - Help
...
*RTGDTA
The program name is taken from the routing data that
was supplied and matched against this entry.
A qualified program name is taken from the routing data
in the following manner:
the program name is taken from positions 37 through 46,
and the library name is taken from positions 47 through 56.
...

Because only the first five positions have data, both of the name values [program and library], as extracted from the Routing Data, are blank; thus the msg CPC1116 showing the blank library and program names.

Because the Request Data (RQSDTA) specified in the creation of the Job Description (JOBD) is the CL command QSH, presumably the desire would be that the Routing Program that should be invoked would be a CL _Request Processor_, with the most obvious choice being QCMD.


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.