! Procedure MCF-PRINT ! Checkpoints: (none) !************************************************************ ! ! Prints a listing of all Master Control Files found on ! logical device MCF:. Either a full print giving all MCFs ! or an incremental print giving only the MCFs that have ! changed since the last run or since a particular date may be selected ! !************************************************************ ;Define variable How many copies of the output do you want? ;No-option restart/;Select option Do you want an incremental listing (yes) or a full listing (no)? ;Option /;Select variable ("Since a certain date","True incremental since last listing (requires some prior initialization)") What type of listing do you want? ;If "" = "Since a certain date"/;Define option yes ;Option /;Define/allow variable Since what date do you want the MCFs? ;Define variable To what courier do you want the print(s) sent? Begin:: @Delete job.journal @Journal "- beginning" @Delete mcf.lst,foo.cmd,foo.lst,mcf.cmd @Define sys: ps:,sys: !To get the new CONVERT ;No-option /@Goto Nosinc @Directory mcf:*.mcf,mcf:*.scf , @Since @No heading @No summary-lines @Separate @Out mcf.cmd @ @Tv mcf.cmd *<:sNo such^[; ! Remove %No such file type ... messages! *0lk> *z"e;x'! Quit if nothing left! *j! Go to next line & quit if no more f-ns! *;u^[^[mcf.cmd! Output this stuff! *iSetup/variable <^[imcf-listing-date^[i> // *^[;x^[^[foo.cmd;t! And make a command to update SETUP.BIN! @Empty-check mcf.cmd ;Error block @Journal "No MCFs were changed since " @Delete mcf.cmd @Goto Done ;End @Take mcf !Create MCF.LST with CONVERT @Take foo !Update MCF-listing-date in SETUP.BIN @Goto Print Nosinc:: @Convert/append mcf:*.mcf/preserve-read-date mcf.lst/identify @Convert/append mcf:*.scf/preserve-read-date mcf.lst/identify @If (error) !Don't choke if user has no .SCFs ;No-option /@Copy mcf.lst foo.lst @Terminal no raise @Tv mcf.lst =s.mcf.^[0l.useqs,.xngn1up! Initialize; N=name, P=page #! =, save place! =qsj56leqb-."g! Go 56 lines from prev. mcf; if >1 page! *0li^L^[.usgni Page ^[%p\! Then insert name again + page #!i * =^[oTestPage^['! and go back to find next MCF! =qbj-lki^L^[.useqs,.xngn1up''l>! Else just insert ,save new name & reset page #! =j!scf!:s.scf.^["eoEnd^['! Find an SCF from the beginning; quit if none! =\uaqa"g0a-15."eook^[''oscf^[! If a gen # follows + , then continue; else search again! =!ok!0li^L^[.useqs,.xngn1up! Insert , save name in G, reset page #! =<:s.scf.^[; \uaqa"g0a-15."e.ub! Find next SCF followed by gen# + ! =!TestPageTwo!qsj56leqb-."g! Go 56 lines from prev. scf; if >1 page! *0li^L^[.usgni Page ^[%p\! Then insert name again + page #!i * =^[oTestPageTwo^['! and go back to find next SCF! =qbj-lki^L^[.useqs,.xngn1up''l>! Else insert , save new name & reset page #! *!End!;x! All done, so write same file!^[^[ ;Option /@Atsign ;Option /*mcf/g Print:: @Print mcf.lst/copies:/unit:Xerox/courier: @Journal "- at checkpoint Xref" @Goto Skip ! ************************* Xref ************************* Xref:: @Journal "- restarting at Xref" @Delete foo.lst Skip:: @Chkpnt Xref @Vdirectory foo.lst @Empty-check foo.lst ;Error block Re-Get Get all .MCF and .SCF files again @Convert/append mcf:*.mcf/preserve-read-date foo.lst/identify @Convert/append mcf:*.scf/preserve-read-date foo.lst/identify @If (error) ;End Re-Get @Terminal no pause command @Tv foo.lst *0ufkd0us! Initialize done flag (F) and current start position (S)! *!start!e.ua0l:s:^["nqa-."gqs,.k''! Delete STR: if any! *qsje.ua0l:s>^["nqa-."gqs,.k''! Delete if any! *qsj0uge-s.^[.-qsucqs,.xn! Reset found flag (G) and put name in N! *!next!.ua!try1!:s.mcf.^["e1ufzj'! Find next MCF line, set F if no more! *qf"e\utqt"g0a-15."eook1^[''otry1^['!ok1!.ub! If no generation #, look again! *qaj!try2!:s.scf.^["eqf+1ufqbj'! Find next SCF line, set F if no more! *qb-."g\utqt"g0a-15."eook2^[''otry2^[!ok2!.ub'! If SCF before MCF and gen # exists, ok! *qaj!try3!0up:s;per^["eqf+1ufzj'! Find next ;PER, set F if no more! *qb-."g0a-106."n0a-146."notry3^[''! Next char must be f or look further! *.ut:s^Sblock^S^["ezj'.-qb-25"lotry3^['! If BLOCK is close by, then look again! *qtub1up'! Set B to ;per position & set P! *qaj!try4!:s;inc^["e3-qf"e! Find next ;INC, quit if all finds failed! *qaj.,zkgni *^[oend^['0ufzj'.-z"n0a-114."n0a-154."notry4^['''! ;INC must be followed by L! *qb-."lqbjqp"e0lcqa,.kqg"egn! If .MCF. or .SCF. was next, kill text!i *^['.usostart^['! and insert MCF or SCF name only! *.ub2s^E[ , ]^[-c:kqbj'! Otherwise, ;Per, so kill variables! *s^E[ , ]^[qa,.kgn40-qc! Kill text, insert MCF name and pad to 40 chars! *<;putqt-140."gqt-173."l-dqt-40.i''! Raise lowercase included file to uppercase! *qt-15."e1; '>l1ugonext^[! Stop on , set G flag and look again! *!end!;wfoo.lst^[;x^[^[! When done, write FOO.LST and exit! @Sort *Sort/record-size:80/key:41,40/key:1,40 foo.lst foo.one *Sort/record-size:80/key:1,80 foo.lst foo.two *Exit @Delete foo.lst @Directory mcf:*.mcf, !This gets the STR: for IQL! @No file-lines @No summary-lines @Output foo.dir @ @Copy tty: foo.cmd;t !This gets the job number for TV! Information job-status @^Z @Take foo foo.log @Define editor: sys:tv @Define sys: ps:,sys: @Iql *Uselibrary ps: *Edit mcf-cross-reference *;rfoo.log^[;ysjob ^[! Get current job #! *i000^[s,^[.-4,.-1xj! Pad w/0's on left and put 3 digits in QJ! *hki;r^[gjiQRY^[33.ii;y^[2<33.i>^[^[! Make a command to read in the query! *hxmgmjr;r^[;w^[r;y^[;x^[hxn! Put into QN a command to write the query! *mm^[^[! Now get the query! *;rfoo.dir^[;y^[^[! And append the STR: for MCF:! *zj-2lk2d.uaeqa,.xd! Move STR: to QD! *jsreference//^[-2ci for^[gdmn! and thence to IQL's RPTHEAD sentence!^[^[ *Run using foo.one *Print report/copies:/unit:Xerox/courier: *Edit mcf-reference *;rfoo.log^[;ysjob ^[! Get current job #! *i000^[s,^[.-4,.-1xj! Pad w/0's on left and put 3 digits in QJ! *hki;r^[gjiQRY^[33.ii;y^[2<33.i>^[^[! Make a command to read in the query! *hxmgmjr;r^[;w^[r;y^[;x^[hxn! Put into QN a command to write the query! *mm^[^[! Now get the query! *;rfoo.dir^[;y^[^[! And append the STR: for MCF:! *zj-2lk2d.uaeqa,.xd! Move STR: to QD! *jsreference//^[-2ci for^[gdmn! and thence to IQL's RPTHEAD sentence!^[^[ *Run using foo.two *Print report/copies:/unit:Xerox/courier: *Exit @Delete foo.one,foo.two,foo.log,foo.dir ;Define option Independent-job yes ;Include end-of-job-procedure