|
). For parameter SRCFILE it says for value *LIBL: "All libraries in thejob's library list are searched until the first match is found". This
Buck Calabroan
On 6/19/2013 3:31 PM, CRPence wrote:
I perceive the resolution being the reverse of that. The SQL OPTION
SRTSEQ is where the resolution starts. The SQL options effect either
toexplicit setting or a setting as a /special value/ that redirects to
effect resolution of the setting from elsewhere, possibly redirecting
conspicuouslythe SRTSEQ() of the job, and the job also may have redirected to
SRTSEQ() of the user, and the user may have redirected to the system
value QSRTSEQ to establish its setting. Viewed that way,
SQLexposes that the CHGJOB SRTSEQ(different) may have no effect on the
SQLstatements performed within the job. Thus changing the Sort Sequence
for the job when the SQL option SRTSEQ has been explicitly established
for the SQL environment [within a job] will have no effect on those
"lookrequests.
However an unresolved special value with the implied meaning of
valueelsewhere" could be established in the SQL options. That special
asresolution can remain confusing, because there are two types of
redirected resolution; i.e. two special values that redirect to the
"job". One special value is *JOB, and the other is *JOBRUN. The *JOB
is resolved at run-time, but is then stored into any compiled objects
forthe resolved value from the job... at that moment; thus if the value
SQLthe job was SRTSEQ(*HEX), then the created object is tagged with
SRTSEQ(*HEX), having redirected to the job to get that value.
AFaIK only the special value *JOBRUN enables the CHGJOB
SRTSEQ(different) to have any impact on the SQL statements running in
the already established SQL environment [within a job]. When the SQL
OPTION of SRTSEQ is set to *JOBRUN vs *JOB, compiled objects will have
the unresolved *JOBRUN established, thus suggesting that the SQL must
delay resolution of the SRTSEQ value until run-time of the statement.
IIRC the SQL option set to *JOB resolves immediately from the job,
rather than for each statement, and thus any CHGJOB SRTSEQ(different)
request issued since starting that SQL environment [e.g. session or
program] has no effect on the sort sequence used at run-time of the
SRTSEQstatements running within that already-established SQL environment....
So only use of *JOBRUN for the SRTSEQ option will enable the CHGJOB to
have any effect on the sort sequence used at run-time; i.e. each
statement must re-resolve from the job, to determine the current
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/db2/rbafzsoption.htmin effect for the job.
I would not have known that by reading the manual, which says (from V5R3
on) '*JOB or *JOBRUN The SRTSEQ value for the job is used.'
If we assume that the OP has no SET OPTION SRTSEQ ('...*LANGIDSHR is
specified somewhere, but not explicitly by us.') then one may understand
why I suggested the system value as a place to begin understanding how
the current hierarchy may be set up. Of course it might also be an
initial program, unless it's a batch job, or it could be the user
profile. Which default to the system value.
In any event, thanks for this interesting insight into SRTSEQ(*JOBRUN)
vs *JOB. I need to do some testing on 7.1...
--buck
As an Amazon Associate we earn from qualifying purchases.
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.