× 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 one accounts for QTEMP in the library list, too.

dcl spcptr ?Job     parm;
dcl dd     Job      bas(?Job) pos(1) char(26);
dcl ol     Main     (?Job) ext parm min(1);
dcl sysptr ?Index   auto init("QWCBT_JOB_INDEX", type(ind, H"A4"));
dcl sysptr ?CmdLine auto init("QUSCMDLN", type(pgm));
dcl spcptr ?Mat     auto init(Mat);
dcl dd     Mat      auto char(48) bdry(16);
dcl spcptr ?Wcbte   def(Mat) pos(H"21");
dcl sysptr ?Target  bas(?Wcbte) pos(H"21");
dcl sysptr ?Qtemp2  bas(?Wcbte) pos(H"41");
dcl sysptr ?Qtemp   baspco pos(H"41");
dcl dd     QtempPos baspco pos(H"4FF") bin(2);
dcl sysptr ?Lib(25) baspco pos(H"511");
dcl spcptr ?Option  auto init(Option);
dcl dd     Option   auto char(16);
dcl dd     Rule     def(Option) pos(1) bin(2) init(1);
dcl dd     Length   def(Option) pos(3) bin(2) init(32);
dcl dd     Occur    def(Option) pos(7) bin(2) init(1);
dcl dd     Return   def(Option) pos(9) bin(2);

    entry      * (Main) ext;                 -- start here
    cat        Mat(1:27), "1", Job;          -- copy full job name
    fndinxen   ?Mat, ?Index, ?Option, ?Mat;  -- try to find job
    cmpnv(b)   Return, 1 / lo(BB);           -- jump if not found
    cmpptrt(b) ?Target, X"01" / neq(BB);     -- jump if not active
    setsppfp   ?Wcbte, ?Target;              -- point to job's PCO
    cpybwp     Mat(1:16), ?Qtemp;            -- save our QTEMP
    cpybwp     ?Qtemp, ?Qtemp2;              -- swap in target QTEMP
    cmpnv(b)   QtempPos, 0 / nhi(AA);        -- jump if not in *LIBL
    cpybwp     ?Lib(QtempPos), ?Qtemp2;      -- swap in target QTEMP
AA: callx      ?CmdLine, *, *;               -- pop up command line
    cpybwp     ?Qtemp, Mat(1:16);            -- restore our QTEMP
    cmpnv(b)   QtempPos, 0 / nhi(BB);        -- jump if not in *LIBL
    cpybwp     ?Lib(QtempPos), Mat(1:16);    -- restore our QTEMP
BB: pend;                                    -- return to caller


+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---


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.