× 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.



This is old school (36 environment), but hoopefully someone can help.



The default Files Library (?FLIB?) is, as usualy, QS36F, but I am trying to
run a test from TSTQS36F. In the OCL there is a statement (FLIB TSTQS36F)
to change the files library. Prior to that there is a CL that physically
removes QS36F from the library list.



There is another CL that copies production files (QS36F) to test (TSTQS36F).
After that there is a step in the OCL that prints the DSPLIBL, which chows
TSTQS36F but no reference to QS36F.



The OCL bombs, though, when it tests whether the test file has records or
not (// IFF ?F'A,?L'1,1'?.WKLINE'?/00000000 GOTO GOTREC), but the test fails
because it does not branch to the tag (// * 'FILE ?L'1,1'?.WKLINE HAS 0
RECORDS, JOB CANNOT RUN!').



All of this runs under a user profile, which uses TSTQS36F as the files
library.



The file tested does exist in TSTQS36F and it does have records. The only
thing I can imagine is that the test is looking in QS36F or some other
library because, if the file cannot be found, the OCL defaults to *Zero
records.



The complete OCL in question: Notes afterwards



DSPLIBL OUTPUT(*PRINT) [1]

CALL PGM(PROJ0013/DTOLIBL) [2]

FLIB TSTQS36F [3]

// LOCAL OFFSET-1,DATA-'J'

// IF ?FLIB?=TSTQS36F EVALUATE P58=DTOOE200

// ELSE EVALUATE P58=TDTOOE

DSPLIBL OUTPUT(*PRINT) [4]

CALL PGM(PROJ0013/CLRWKFILES) [5]

DSPLIBL OUTPUT(*PRINT) [6]

*

* IF FILE HAS 0 RECORDS DO NOT LET JOB RUN

// IFF ?F'A,?L'1,1'?.WKLINE'?/00000000 GOTO GOTREC

// * 'FILE ?L'1,1'?.WKLINE HAS 0 RECORDS, JOB CANNOT RUN!' [7]



[1] Shows QS36F in the USRLIBL,

[2] Removes QS36F and adds TSTQS36F to the USRLIBL.

[3] The 36EE command to change the files library

[4] Shows TSTQS36F in the USRLIBL. No reference to QS36F

[5] Copies the production files (A.WKxxxx) to TSTQS36F (J.WKxxxx) and clears
the production files.

[6] Shows TSTQS36F in the USRLIBL. No reference to QS36F.

[7] Procedure blows off here.



This morning I verified that the J.WKxxxx files exist in TSTQS36F and that
they have records. So why does the procedure crash and burn at note [7]?



Jerry C. Adams

IBM i Programmer/Analyst

--

A&K Wholesale

Murfreesboro, TN

615-867-5070




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.