User Tools

Site Tools


cdc:nos2.source:nam5871:collect

COLLECT

Table Of Contents

  • [00003] PRGM CLCDCNT
  • [00005] PRGM COLLECT
  • [00019] FUNC KEYLINE
  • [00020] PROC READ$CFO
  • [00021] PROC COLECT (MAIN PROCESS)
  • [00473] PROC READ$CFO
  • [00498] PROC FILL55 (FILET)
  • [00511] PROC STRIP55 (STRIPIT)
  • [00526] PROC SHOTERM (FWA, COUNT, FLUSH)
  • [00544] PROC CLR$OPMSG
  • [00554] PROC WEEKDAY
  • [00580] FUNC DCODE (CHARS) I
  • [00603] PROC CRACK$CALL
  • [00644] PROC INITCPA
  • [00688] PROC DS$DEFAULT
  • [00711] FUNC IN$RANGE B
  • [00738] PROC SETUP$CLCT
  • [00774] PROC SHOW$STAT (SWRD, OP, FTYPE)
  • [00805] FUNC PFERR (NAMPF) B
  • [00829] PROC CAT$LIST
  • [00874] PROC COPY$ONE
  • [00919] PROC COPY$FILES
  • [00946] PROC CPYMDIDUMP
  • [01029] PROC CPYMDIDMPS

Source Code

COLLECT.txt
  1. *DECK COLLECT
  2. *IF DEF,CDCNET,1
  3. PRGM CLCDCNT;
  4. *IF -DEF,CDCNET,1
  5. PRGM COLLECT;
  6. #
  7.   DUMP COLLECTION PROCESSOR
  8.  
  9.  
  10.   P R O C E D U R E C O N T E N T S
  11.   ------------------------------------
  12.  
  13.  
  14.   ITEM DECLARATIONS
  15.   LINK DECLARATIONS
  16.   ARRAY DECLARATIONS
  17.   COMMON DECLARATIONS
  18.   MISC DECLARATIONS
  19.   FUNC KEYLINE
  20.   PROC READ$CFO
  21.   PROC COLECT (MAIN PROCESS)
  22.  
  23.  
  24.  
  25.   COLLECT COPYRIGHT CONTROL DATA SYSTEMS INC. 1994.
  26.  
  27.  
  28. #
  29.  
  30. CONTROL EJECT;
  31.  
  32.  
  33. #
  34.  
  35.   NETWORK DUMP COLLECTION PROGRAM
  36.  
  37.   THE NETWORK DUMP COLLECTION PROGRAM, COLLECT, IS USED TO
  38.   CO-LOCATE THE VARIOUS DUMP, TRACE, STATISTIC AND LIST
  39.   FILES WHICH RESULT FROM ANY INVOCATION OF THE NETWORK.
  40.   THESE FILES ARE FIRST COPIED TO A LOCAL FILE BY THE
  41.   PROGRAM "COLLECT" AND THEN, VIA JOB CONTROL STATEMENTS,
  42.   THIS FILE IS COPIED TO A TAPE FILE.
  43.  
  44.   THE CALL STATEMENT FOR THE COLLECTION PROGRAM TAKES THE
  45.   FOLLOWING FORM--
  46.  
  47.   COLLECT(NIN=XXX[,NOPURGE][,NOSAVE])
  48.  
  49.   THE NETWORK INVOCATION NUMBER XXX IS A ONE TO THREE CHAR-
  50.   ACTER DECIMAL NUMBER WHICH INDICATES THE UPPER LIMIT OF THE
  51.   INVOCATION NUMBERS TO BE COLLECTED. ALL FILES WITH AN NIN
  52.   FROM 1 THROUGH XXX WILL BE COPIED TO THE LOCAL
  53.   FILE. IF THE NIN VALUE IS NOT SPECIFIED, A DEFAULT
  54.   VALUE OF 1 (ONE) WILL BE USED.
  55.  
  56.   THE NOPURGE OPTION, IF SPECIFIED, INDICATES THAT THE COLLECTED
  57.   FILES ARE NOT TO BE PURGED AFTER THEY ARE SUCCESSFULLY COPIED
  58.   TO THE COMMON LOCAL FILE. IF THIS OPTION IS NOT SPEC-
  59.   IFIED, EACH FILE COPIED WILL BE IMMEDIATELY PURGED.
  60.  
  61.   THE NOSAVE OPTION, WHEN SPECIFIED, BYPASSES THE FILE COPYING
  62.   FUNCTIONS. THAT IS, NO DUMPXXX FILES WILL BE CREATED. THIS
  63.   OPTION MAY BE SPECIFIED TO CAUSE THE PURGING (ONLY) OF ALL
  64.   NETWORK DUMP FILES.
  65.  
  66.   THE COLLECTION PROCESS IS INITIATED VIA THE NETWORK STARTUP
  67.   JOB, NAMI. THE RELEASED NAMI JOB MASTER FILE WILL CAUSE
  68.   NAMI TO INITIATE THE COLLECTOR JOB UPON EACH INVOCATION OF THE
  69.   NETWORK. THE COLLECTOR JOB WILL BE PASSED AN NIN VALUE OF THE
  70.   LAST NETWORK INVOCATION NUMBER-- THE CURRENT NETWORK WILL BE
  71.   INITIATED WITH AN INCREMENTAL VALUE OF THE NIN. THE PURGE AND
  72.   SAVE OPTIONS WILL BE IN EFFECT. FOR EXAMPLE, ON THE 5TH
  73.   INITIATION OF THE NETWORK, THE COLLECTOR JOB WILL HAVE THE
  74.   CONTROL STATEMENT CALL OF---
  75.  
  76.   COLLECT(NIN=004)
  77.  
  78.   AND THE NETWORK WILL BE STARTED WITH AN NIN OF 005.
  79.  
  80.  
  81.   THE COLLECTOR JOB WILL PROCESS ALL FILES WHICH HAVE A NAME OF
  82.   THE FORM---
  83.  
  84.   PPTSXXX WHERE PP = PRODUCT PREFIX
  85.   CS, NS, NV (FOR NVF),
  86.   NI (FOR NIP), TV (FOR TVF)
  87.   IA (FOR IAF), RB (FOR RBF),
  88.   NP (NPUS), IT (ITF), PR (PSU),
  89.   QT (QTF), QS (QTFS), PS (PTFS),
  90.   AT (ATF), PI (FTPI), TS (FTPS)
  91. *IF DEF,CDCNET
  92.   FS, OS, LS, IN (INITMDI)
  93.   DI...DR, DS...D9 (MDI DUMPS)
  94. *ENDIF
  95.  
  96.   T = TYPE OF FILE
  97.   L (LIST FILE), T (TRACE FILE)
  98.   S (STATISTICS FILE), D (DUMP
  99.   FILE)
  100.  
  101.   S = SUB TYPE FOR FILE
  102.   0, 1 OR 2
  103.  
  104.   XXX = NETWORK INVOCATION NUMBER
  105.   000 THROUGH 999
  106.  
  107.   NOTE - T AND S ARE NOT VALID FOR NP AND
  108.   MDI DUMP FILES.
  109.  
  110.   THE FILE PRODUCED BY THE COLLECTOR JOB HAS ONE FILE
  111.   AND MANY RECORDS. EACH FILE SELECTED (SEE ABOVE FILE NAME
  112.   DESCRIPTION) IS COPIED TO THE COMMON FILE AS ONE OR MORE
  113.   RECORDS WHERE THE FIRST RECORD IS PRECEDED BY A 16 (20B) WORD
  114.   RECORD WHICH CONTAINS THE FILE NAME. IN THIS WAY, AN ITEMIZE
  115.   OR CATALOG OF THE COLLECTOR COMMON FILE WILL EASILY SHOW
  116.   WHICH FILES WERE COPIED.
  117.  
  118.   THE LOCAL FILES CREATED BY THE COLLECTION PROGRAM HAVE
  119.   THE NAMES---
  120.   DUMPXXX WHERE XXX IS THE SPECIFIED OR DEFAULT
  121.   NIN FROM THE COLLECTOR CALL
  122.   STATEMENT. THIS FILE WILL
  123.   CONTAIN ALL OF THE FILES
  124.   EXCEPT THOSE WRITTEN TO
  125.   DUNPXXX AND/OR DMDIXXX.
  126.  
  127.   DUNPXXX WHERE XXX IS THE SPECIFIED OR DEFAULT
  128.   NIN FROM THE COLLECTOR CALL
  129.   STATEMENT. THIS FILE WILL
  130.   CONTAIN THE NP DUMP FILES, THAT
  131.   IS, FILES OF THE NAME NPZZXXX.
  132. *IF DEF,CDCNET
  133.  
  134.   DMDIXXX WHERE XXX IS THE SPECIFIED OR DEFAULT
  135.   NIN FROM THE COLLECTOR CALL
  136.   STATEMENT. THIS FILE WILL
  137.   CONTAIN THE MDI DUMP FILES, THAT
  138.   IS, FILES OF THE NAME
  139.   DI_AA_NIN ... DI_99_NIN
  140.   . .
  141.   . .
  142.   . .
  143.   DR_AA_NIN ... DR_99_NIN
  144.  
  145.   DS_AA_NIN ... DS_99_NIN
  146.   . .
  147.   . .
  148.   . .
  149.   D9_AA_NIN ... D9_99_NIN
  150. *ENDIF
  151.  
  152.  
  153.   THE JOB SKELETON FOR THE COLLECTOR JOB WHICH IS RELEASED
  154.   WITH THE MULTI-HOST NETWORK WILL CAUSE THE COMMON (LOCAL)
  155.   FILES TO BE COPIED TO MAGNETIC TAPE. WHEN THE FILES HAVE BEEN
  156.   SUCCESSFULLY COPIED, COLLECT WILL AGAIN BE EXECUTED TO PURGE
  157.   THE INDIVIDUAL FILES WHICH WERE COLLECTED.
  158.  
  159.  
  160.   TO USE THE COLLECTOR JOB AS A PURGING VEHICLE, THE FOLLOWING
  161.   CALL STATEMENT MAY BE USED---
  162.  
  163.   COLLECT(NIN=999,NOSAVE)
  164.  
  165.   WITH THIS INVOCATION OF THE COLLECTOR, ALL FILES WITH THE
  166.   NAME FORMAT AS DESCRIBED ABOVE WILL BE PURGED. NO DUMP FILE
  167.   WILL BE CREATED.
  168.  
  169.  
  170. #
  171. CONTROL EJECT;
  172.  
  173. #ITEM DECLARATIONS #
  174.  
  175. BEGIN
  176.  
  177. ITEM INDX1 I=0;
  178. ITEM NDXPF I=0;
  179. ITEM K I=0, K1 I=0, K2 I=0;
  180. ITEM J1 I=0, J2 I=0, J3 I=0;
  181. ITEM N I=0, N1 I=0, N2 I=0;
  182. ITEM NR1 R=0, NR2 R=0;
  183. ITEM OPTION I=0;
  184. ITEM TOTPRU I=0;
  185.  
  186. DEF STATEOI #O"1031"#;
  187.  
  188. ITEM SPACES C(10) = " ";
  189. ITEM EDITX C(10);
  190. ITEM SCANF C(10);
  191. ITEM SCANK C(10);
  192. ITEM SCANV C(10);
  193. ITEM NETINV C(10); #NIN0ZZZ #
  194. ITEM USERNUM C(10);
  195.  
  196. ITEM INV$LOW I=1;
  197. ITEM INV$HIGH I=999;
  198. ITEM INV$ONE I=0;
  199.  
  200. ITEM DD60 B=FALSE;
  201. ITEM FL2PURGE B=TRUE;
  202. ITEM FL2TAPE B=FALSE;
  203. ITEM FL2DISK B=TRUE;
  204. ITEM FL2SAVE B=TRUE;
  205. ITEM MORE$2$DO B=TRUE;
  206. ITEM SHORT B=FALSE;
  207. ITEM CHK$RANGE B=TRUE;
  208. *IF DEF,CDCNET
  209. ITEM $DEFAULT C(10)= O"53040506012514240000"; # PN & UN PARAMS #
  210. ITEM $CURRENT C(10)= O"53032522220516240000"; # FOR NETCDA CALL#
  211. *ENDIF
  212.  
  213. DEF MODE$P #1#;
  214. DEF MODE$T #2#;
  215. DEF MODE$D #4#;
  216. DEF MODE$S #8#;
  217.  
  218.  
  219. COMMON IDINFO;
  220. BEGIN
  221. ITEM IDVERSN C(40); # COLLECTOR VERSION IDENT #
  222. ITEM COPYRIGHT C(50); # COLLECTOR COPYRIGHT #
  223. END
  224.  
  225. CONTROL EJECT;
  226. #LINK DECLARATIONS #
  227.  
  228.  
  229. XREF PROC CFOWAIT;
  230. XREF PROC CFOBCLR;
  231. XREF PROC CFOBSET;
  232. XREF PROC CPYOPN;
  233. XREF PROC CPYATT;
  234. XREF PROC CPYGET;
  235. XREF PROC CPYFLS;
  236. XREF PROC CPYPUR;
  237. XREF PROC CPYRET;
  238. XREF PROC CPYSAV;
  239. XREF PROC FINSHIO;
  240. XREF PROC OFLUSH;
  241. XREF PROC PUTLINE;
  242. XREF PROC PUTTERM;
  243. XREF PROC PUTTRMX;
  244. XREF PROC SENDMSG;
  245. XREF PROC SETUPC;
  246. XREF PROC SIERRA;
  247. XREF PROC STARTIO;
  248. XREF PROC TIGRLST;
  249.  
  250. XREF FUNC XCDD C(10);
  251. XREF FUNC XCOD C(10);
  252. XREF FUNC XSFW C(10);
  253. XREF FUNC XCFD C(10);
  254.  
  255. *IF DEF,CDCNET
  256. XREF PROC NETCDA;
  257. XREF PROC NETFMA;
  258. XREF PROC NETFMP;
  259. *ENDIF
  260.  
  261. CONTROL EJECT;
  262. #ARRAY DECLARATIONS #
  263.  
  264. ARRAY LINE[0:10] S(1);
  265. BEGIN
  266. ITEM LIN6 C(0, 0, 6);
  267. ITEM LINX C(0, 0, 10);
  268. ITEM LIN80 C(0, 0, 80);
  269. ITEM LINX1A C(0, 0, 110);
  270. ITEM LIN4 C(0, 0, 4);
  271. END
  272.  
  273.  
  274.  
  275. ARRAY ENVIRONS [0:0] S(21);
  276. BEGIN
  277. ITEM ENV1 C(0, 0, 10) = [" "];
  278. ITEM ENV2 C(1, 0, 10) = ["CFO=YES "];
  279. ITEM ENV3 C(2, 0, 10) = ["CMU=YES "];
  280. ITEM ENV4 C(3, 0, 10) = ["C/MEJ=YES "];
  281. ITEM ENV5 C(4, 0, 10) = [" "];
  282. ITEM ENV6 C(5, 0, 10) = ["PPUS=00 "];
  283. ITEM ENV7 C(6, 0, 10) = ["CM=000000B"];
  284. ITEM ENV8 C(7, 0, 10) = [" "];
  285. ITEM ENV9 C(8, 0, 20) = ["CONTROL STATEMENT = "];
  286. ITEM ENV10 C(08, 0, 50);
  287. ITEM ENV11 C(11, 0, 10);
  288. ITEM ENV12 C(12, 0, 10);
  289. ITEM ENV13 C(13, 0, 10) = [" "];
  290. ITEM ENV14 C(14, 0, 10) = ["SUNDAY "];
  291. ITEM ENV15 C(15, 0, 20) = [" MM/DD/YY HH.MM.SS "];
  292. ITEM ENV17 C(17, 0, 10) = [" "];
  293. ITEM ENV18 C(18, 0, 10) = ["SAVE=YES "];
  294. ITEM ENV19 C(19, 0, 10) = ["TAPE=YES "];
  295. ITEM ENV20 C(20, 0, 10) = ["PURGE=YES "];
  296. END
  297.  
  298.  
  299. CONTROL EJECT;
  300. #COMMON DECLARATIONS #
  301. COMMON PASSIT;
  302. BEGIN
  303. ITEM IOFWA I;
  304. ITEM IOCNT I;
  305. ITEM IOCMP I;
  306. ITEM IOLVL I;
  307. ITEM IOFLG I;
  308. END
  309.  
  310. COMMON PARAMS;
  311. BEGIN
  312. ITEM CMODE I;
  313. ITEM CSTAT I;
  314. ARRAY CMSG [0:7] S(1);
  315. BEGIN
  316. ITEM CMESS C(0, 0, 10);
  317. ITEM CMSG80 C(0, 0, 80);
  318. END
  319. END
  320.  
  321. COMMON TIGRCOM;
  322. BEGIN
  323. ITEM TCSTAT I;
  324. ITEM TCLEN I;
  325. ARRAY TBUFFR [0:64] S(1);
  326. BEGIN
  327. ITEM TBUF C(0, 0, 10);
  328. ITEM TBUFNAM C(0, 0, 7);
  329. ITEM TBUFCNT U(0, 0, 24);
  330. ITEM TBUFTYP C(0, 42, 3);
  331. END
  332. END
  333.  
  334. COMMON COPYCOM;
  335. BEGIN
  336. ITEM PFN1 C(10);
  337. ITEM UN1 C(10);
  338. ITEM PFN2 C(10);
  339. ITEM UN2 C(10);
  340. ITEM PFN3 C(10);
  341. ITEM UN3 C(10);
  342. END
  343.  
  344. COMMON PFEMSG;
  345. BEGIN
  346. ITEM PFERMSG C(30);
  347. ITEM PFEZBYT I;
  348. END
  349. CONTROL EJECT;
  350. #COMMON DECLARATIONS #
  351.  
  352. COMMON SIERRAC;
  353. BEGIN
  354. ARRAY SIE [0:0] S(7);
  355. BEGIN
  356. ITEM SIECM U(0, 00, 30);
  357. ITEM SIEDATE C(1, 00, 10);
  358. ITEM SIEJDATE C(2, 00, 10);
  359. ITEM SIEJYR C(2, 30, 02);
  360. ITEM SIEJDAY C(2, 42, 03);
  361. ITEM SIETIME C(3, 00, 10);
  362. ITEM SIECPUS U(4, 24, 24);
  363. ITEM SIECPUMS U(4, 48, 12);
  364. ITEM SIEUSER C(5, 00, 07);
  365. ITEM SIEMID C(6, 00, 10);
  366. END
  367. END
  368.  
  369. COMMON MSGCOM;
  370. BEGIN
  371. ARRAY MSGCOMA [0:8] S(1);
  372. BEGIN
  373. ITEM OPMSG1 C(0, 00, 10);
  374. ITEM OPMSG C(0, 00, 80);
  375. ITEM OPMSGZB U(0, 00, 60);
  376. END
  377. END
  378.  
  379. COMMON PFTABLES;
  380. BEGIN
  381. ARRAY PFTABLE [0:99] S(1);
  382. BEGIN
  383. ITEM PFLIST C(0, 00, 9);
  384. ITEM PFTYPE U(0, 54, 6);
  385. END
  386. END
  387.  
  388. DEF DIR #4#;
  389. DEF IND #9#;
  390. *IF DEF,CDCNET
  391. DEF NFM #3#;
  392.  
  393. COMMON NFMBLK;
  394. BEGIN
  395. ARRAY NETFMBLOCK [0:30] S(1);
  396. BEGIN
  397. ITEM NFMLFN C(0,0,6);
  398. ITEM NFMNFN C(0,0,10);
  399. ITEM NFMPFN C(0,0,7);
  400. ITEM NFMSTAT U(0,42,18);
  401. ITEM NFMWORD U(0,0,60);
  402. END
  403. END
  404. *ENDIF
  405. CONTROL EJECT;
  406.  
  407. COMMON PFNLIST;
  408. BEGIN
  409. ARRAY PFNA [0:20] S(1);
  410. BEGIN
  411. ITEM PFNC1C2 C(0, 0, 10);
  412. END
  413. ARRAY PFNB [0:39] S(1);
  414. BEGIN
  415. ITEM PFNC3 C(0, 0, 10);
  416. ITEM PFNC3NP C(20, 0, 10);
  417. END
  418. END
  419.  
  420. COMMON PACKING;
  421. BEGIN
  422. ITEM PACK80 C(80);
  423. ITEM PACK160 C(100);
  424. ITEM PACKEND C(10);
  425. ARRAY PACK01 [0:79] S(1);
  426. BEGIN
  427. ITEM PACKW C(0, 0, 10);
  428. END
  429. ITEM UPCSTAT U;
  430. ITEM UPCOUNT U;
  431. END
  432. CONTROL EJECT;
  433.  
  434. XREF
  435. ARRAY RAZERO [0:0] S(64);
  436. BEGIN
  437. ITEM JCACFO B(00, 45, 01);
  438. ITEM JCACMU B(53, 00, 01);
  439. ITEM JCACME B(54, 00, 01);
  440. ITEM JCAPPU U(54, 07, 05);
  441. ITEM JCA70 C(56, 00, 50);
  442. ITEM JCAOPMSG C(56, 00, 80);
  443. END
  444.  
  445. ARRAY DATALNY [0:0] S(12);
  446. BEGIN
  447. ITEM LNY0 C(0, 0, 20) = [" MODE = 00B"];
  448. ITEM LNY1 C(2, 0, 20) = [" OPTION = 00B"];
  449. ITEM LNY2 C(4, 0, 20) = [" NIN = 000D"];
  450. ITEM LNY3 C(6, 0, 20) = [" NINCR = 000D"];
  451. ITEM LNY4 C(8, 0, 20) = [" NINLO = 000D"];
  452. ITEM LNY5 C(10,0, 20) = [" NINHI = 000D"];
  453. ITEM LNY1A C(1, 42, 2);
  454. ITEM LNY1B C(3, 42, 2);
  455. ITEM LNY1C C(5, 36, 3);
  456. ITEM LNY1D C(7, 36, 3);
  457. ITEM LNY1E C(9, 36, 3);
  458. ITEM LNY1F C(11,36, 3);
  459. END
  460.  
  461. ARRAY DAY2DAY [0:6] S(1);
  462. BEGIN
  463. ITEM DAY0 C(0, 0, 10) = ["SUNDAY "];
  464. ITEM DAY1 C(1, 0, 20) = ["MONDAY TUESDAY "];
  465. ITEM DAY3 C(3, 0, 20) = ["WEDNESDAY THURSDAY "];
  466. ITEM DAY5 C(5, 0, 20) = ["FRIDAY SATURDAY "];
  467. END
  468.  
  469. CONTROL EJECT;
  470.  
  471.  
  472. # PROC READ$CFO #
  473. PROC READ$CFO;
  474.  
  475. BEGIN
  476.  
  477. ITEM SAVEFWA I;
  478.  
  479. FOR K = 0 STEP 1 UNTIL 7 DO
  480. CMESS[K] = SPACES;
  481. CFOBSET;
  482. # IF NOT DD60 THEN READLN #
  483. CFOWAIT;
  484. CMSG80[0] = JCAOPMSG[0];
  485. SAVEFWA = IOFWA;
  486. IOFWA = LOC(CMSG80[0]);
  487. IOCNT = 7;
  488. PUTLINE;
  489. OPMSG[0] = CMSG80[0];
  490. OPMSGZB[4] = 0;
  491. SENDMSG;
  492. IOFWA = SAVEFWA;
  493.  
  494. END #READ CFO#
  495.  
  496.  
  497.  
  498. PROC FILL55 (FILET);
  499.  
  500. BEGIN
  501.  
  502. ITEM FILET C(10);
  503.  
  504. FOR N2 = 0 STEP 1 UNTIL 9 DO
  505. IF (C<N2,1>FILET LS "A") OR (C<N2,1>FILET GR "9")
  506. THEN C<N2,1>FILET = " ";
  507.  
  508. END #FILL55#
  509.  
  510.  
  511. PROC STRIP55 (STRIPIT);
  512.  
  513. BEGIN
  514.  
  515. ITEM STRIPIT C(10);
  516.  
  517. FOR N2 = 0 STEP 1 UNTIL 9 DO
  518. IF (C<N2,1>STRIPIT LS "A") OR (C<N2,1>STRIPIT GR "9")
  519. THEN C<N2,1>STRIPIT = 0;
  520.  
  521. END #STRIP55#
  522.  
  523. CONTROL EJECT;
  524. # PROC SHOTERM #
  525.  
  526. PROC SHOTERM (FWA, COUNT, FLUSH);
  527.  
  528. BEGIN
  529.  
  530. ITEM FWA I;
  531. ITEM COUNT I;
  532. ITEM FLUSH B;
  533.  
  534. IF FWA NQ 0 THEN IOFWA = FWA;
  535. IF COUNT NQ 0 THEN IOCNT = COUNT;
  536. PUTTERM;
  537. IF FLUSH THEN PUTTRMX;
  538.  
  539. END #SHOTERM#
  540.  
  541.  
  542.  
  543. # PROC CLR$OPMSG #
  544. PROC CLR$OPMSG;
  545. BEGIN
  546. ITEM NN I;
  547. FOR NN = 0 STEP 1 UNTIL 7 DO
  548. OPMSG1[NN] = SPACES;
  549. END
  550.  
  551.  
  552.  
  553. # PROC WEEKDAY #
  554. PROC WEEKDAY;
  555.  
  556. BEGIN
  557.  
  558. EDITX = SIEJYR;
  559. N1 = C<0,1>EDITX - "0";
  560. N2 = C<1,1>EDITX - "0";
  561. N = (N1 * 10) + N2;
  562. NR1 = 365.25 * N;
  563. EDITX = SIEJDAY;
  564. N1 = (C<0,1>EDITX - "0") * 100;
  565. N1 = N1 + ((C<1,1>EDITX - "0") * 10);
  566. N1 = N1 + (C<2,1>EDITX - "0");
  567. NR1 = NR1 + N1;
  568. N = NR1;
  569. NR2 = N;
  570. IF NR1 EQ NR2 THEN NR1 = NR1 - 1.0;
  571. N = NR1;
  572. FOR K=0 WHILE N GR 6 DO
  573. N = N -7;
  574. ENV14 = DAY0[N];
  575.  
  576. END #WEEKDAY#
  577.  
  578. CONTROL EJECT;
  579.  
  580. FUNC DCODE (CHARS) I;
  581.  
  582. BEGIN
  583.  
  584. ITEM CHARS C(10);
  585. ITEM TVAL I;
  586. ITEM J1 I;
  587.  
  588. DCODE = 0;
  589. TVAL = 0;
  590.  
  591. FOR J1 = 0 STEP 1 UNTIL 9 DO
  592. BEGIN
  593. IF (C<J1,1>CHARS GQ "0") AND (C<J1,1>CHARS LQ "9")
  594. THEN TVAL = TVAL * 10 + (C<J1,1>CHARS - "0");
  595. END
  596.  
  597. DCODE = TVAL;
  598.  
  599. END #DCODE#
  600.  
  601. CONTROL EJECT;
  602.  
  603. PROC CRACK$CALL;
  604.  
  605. BEGIN
  606. PACK80 = SPACES;
  607. PACK80 = JCAOPMSG;
  608. C<79,1>PACK80 = ".";
  609.  
  610. SETUPC;
  611.  
  612. USERNUM = SPACES;
  613. NETINV = "NIN0999 ";
  614. SHORT = TRUE;
  615.  
  616. FOR J2 = 0 STEP 1 WHILE C<0,1>PACKW[J2] NQ 0 DO
  617. BEGIN
  618. SCANF = PACKW[J2];
  619. SCANV = PACKW[J2+1];
  620. FILL55 (SCANF);
  621. FILL55 (SCANV);
  622. SCANK = C<0, 4>SCANF;
  623. IF SCANK EQ "NOPU" THEN FL2PURGE = FALSE;
  624. IF SCANK EQ "NOSA" THEN FL2SAVE = FALSE;
  625. IF SCANK EQ "UN " THEN USERNUM = SCANV;
  626. IF SCANK EQ "NINL" THEN INV$LOW = DCODE (SCANV);
  627. IF SCANK EQ "NINH" THEN INV$HIGH = DCODE (SCANV);
  628. IF SCANK EQ "NIN " THEN INV$HIGH = DCODE (SCANV);
  629. IF SCANK EQ "OIN " THEN INV$HIGH = DCODE (SCANV);
  630. IF SCANK EQ "NINC" THEN INV$ONE = DCODE (SCANV);
  631. IF SCANK EQ "SHOR" THEN SHORT = TRUE;
  632. IF SCANK EQ "FULL" THEN SHORT = FALSE;
  633. END
  634. IF INV$ONE NQ 0 THEN CHK$RANGE = FALSE;
  635. IF INV$ONE EQ 0 THEN INV$ONE = INV$HIGH;
  636. INV$ONE = INV$ONE + 10000;
  637. EDITX = XCDD (INV$ONE);
  638. INV$ONE = INV$ONE - 10000;
  639. C<4,3>NETINV = C<7,3>EDITX;
  640. END #CRACK$CALL#
  641. CONTROL EJECT;
  642.  
  643. # PROC INITCPA #
  644. PROC INITCPA;
  645.  
  646. BEGIN
  647.  
  648. SIERRA;
  649.  
  650. IF NOT JCACFO THEN C<4,3>ENV2 = "NO ";
  651. IF NOT JCACMU THEN C<4,3>ENV3 = "NO ";
  652. IF NOT JCACME THEN C<6,3>ENV4 = "NO ";
  653. N = JCAPPU;
  654. EDITX = XCDD(N);
  655. C<5,2>ENV6 = C<8,2>EDITX;
  656. N = SIECM;
  657. EDITX = XCOD(N);
  658. C<3,6>ENV7 = C<4,6>EDITX;
  659. C<00,10>ENV15 = SIEDATE;
  660. C<10,10>ENV15 = SIETIME;
  661. WEEKDAY;
  662. IF (NOT FL2PURGE) THEN C<6,3>ENV20 = "NO ";
  663. IF (NOT FL2TAPE) THEN C<5,3>ENV19 = "NO ";
  664. IF (NOT FL2SAVE) THEN C<5,3>ENV18 = "NO ";
  665. SHOTERM (LOC(ENV1), 1, FALSE);
  666. SHOTERM (LOC(ENV1), 4, FALSE);
  667. SHOTERM (LOC(ENV5), 3, FALSE);
  668. SHOTERM (LOC(ENV8), 3, FALSE);
  669. ENV10 = JCA70;
  670. FOR K = 0 STEP 1 UNTIL 49 DO
  671. IF C<K,1>ENV10 EQ 0 THEN C<K,1>ENV10 = " ";
  672. SHOTERM (LOC(ENV8), 6, FALSE);
  673. SHOTERM (LOC(ENV13), 1, FALSE);
  674. SHOTERM (LOC(ENV13), 4, FALSE);
  675. SHOTERM (LOC(ENV17), 1, FALSE);
  676. SHOTERM (LOC(ENV17), 4, FALSE);
  677. SHOTERM (LOC(ENV17), 1, TRUE);
  678.  
  679. NR1 = SIECPUS * 1000.0;
  680. NR2 = SIECPUMS;
  681. NR1 = NR1 + NR2;
  682.  
  683. END #INITCPA#
  684.  
  685. CONTROL EJECT;
  686.  
  687. # PROC DS$DEFAULT #
  688. PROC DS$DEFAULT;
  689.  
  690. BEGIN
  691.  
  692. EDITX = XCOD(CMODE);
  693. LNY1A = C<8,2>EDITX;
  694. EDITX = XCOD(OPTION);
  695. LNY1B = C<8,2>EDITX;
  696. LNY1C = C<4,3>NETINV;
  697. EDITX = XCDD(INV$ONE);
  698. LNY1D = C<7,3>EDITX;
  699. EDITX = XCDD(INV$LOW);
  700. LNY1E = C<7,3>EDITX;
  701. EDITX = XCDD(INV$HIGH);
  702. LNY1F = C<7,3>EDITX;
  703. SHOTERM (LOC(LNY0), 6, FALSE);
  704. SHOTERM (LOC(LNY3), 6, FALSE);
  705. SHOTERM (LOC(LNY0), 1, TRUE);
  706.  
  707. END #DS$DEFAULT#
  708.  
  709.  
  710.  
  711. FUNC IN$RANGE B;
  712.  
  713. BEGIN
  714.  
  715. IN$RANGE = FALSE;
  716. EDITX = C<4,3>PFN1;
  717. IF CHK$RANGE THEN
  718. BEGIN
  719. IF DCODE (EDITX) LS INV$LOW THEN RETURN;
  720. IF DCODE (EDITX) GR INV$HIGH THEN RETURN;
  721. IN$RANGE = TRUE;
  722. RETURN;
  723. END
  724. ELSE
  725. BEGIN
  726. IF DCODE (EDITX) NQ INV$ONE THEN RETURN;
  727. IN$RANGE = TRUE;
  728. RETURN;
  729. END
  730.  
  731. END #IN$RANGE#
  732.  
  733.  
  734.  
  735. CONTROL EJECT;
  736.  
  737. # PROC SETUP$CLCT #
  738. PROC SETUP$CLCT;
  739.  
  740. BEGIN
  741.  
  742. CLR$OPMSG;
  743. OPMSG[0] = IDVERSN;
  744. SENDMSG;
  745.  
  746. CRACK$CALL;
  747.  
  748.  
  749.  
  750. CMODE = 0;
  751. IF FL2PURGE THEN CMODE = CMODE + MODE$P;
  752. IF FL2TAPE THEN CMODE = CMODE + MODE$T;
  753. IF FL2DISK THEN CMODE = CMODE + MODE$D;
  754. IF FL2SAVE THEN CMODE = CMODE + MODE$S;
  755.  
  756. STRIP55(USERNUM);
  757.  
  758. INITCPA;
  759. DS$DEFAULT;
  760.  
  761. FOR N = 0 STEP 1 UNTIL 99 DO
  762. BEGIN
  763. PFLIST[N] = SPACES;
  764. PFTYPE[N] = 0;
  765. END
  766.  
  767.  
  768. TCSTAT = 0;
  769. MORE$2$DO = TRUE;
  770.  
  771. END #SETUP$CLCT#
  772. CONTROL EJECT;
  773.  
  774. PROC SHOW$STAT (SWRD, OP, FTYPE);
  775.  
  776. BEGIN
  777.  
  778. ITEM SWRD C(10);
  779. ITEM OP C(10);
  780. ITEM FTYPE I;
  781.  
  782. LINX[0] = SPACES;
  783. EDITX = SWRD;
  784. EDITX = C<0,7>EDITX;
  785. FILL55 (EDITX);
  786. IF FTYPE EQ DIR THEN LINX[0] = " DIR FILE ";
  787. IF FTYPE EQ IND THEN LINX[0] = " IND FILE ";
  788. *IF DEF,CDCNET
  789. IF FTYPE EQ NFM THEN LINX[0] = " NFM FILE ";
  790. *ENDIF
  791. LINX[1] = EDITX;
  792. LINX[2] = " FCN = ";
  793. C<7,3>LINX[2] = C<0,3>OP;
  794. LINX[3] = " ST = ";
  795. K = SWRD LAN O"77 7777";
  796. EDITX = XCOD(K);
  797. LINX[4] = SPACES;
  798. LINX[4] = C<4,6>EDITX;
  799. SHOTERM (LOC(LINX[0]), 5, TRUE);
  800.  
  801. END #SHOW$STAT#
  802.  
  803.  
  804.  
  805. FUNC PFERR (NAMPF) B;
  806.  
  807. BEGIN
  808.  
  809. ITEM NAMPF C(10);
  810.  
  811. K = NAMPF / 2**10;
  812. K = K LAN O"377";
  813. IF K EQ 0 THEN PFERR = FALSE;
  814. IF K NQ 0 THEN PFERR = TRUE;
  815. IF K EQ 0 THEN RETURN;
  816.  
  817. LINX[0] = SPACES;
  818. LINX[1] = "ERROR CODE";
  819. LINX[2] = SPACES;
  820. EDITX = XCOD (K);
  821. LINX[2] = C<6,4>EDITX;
  822. SHOTERM (LOC(LINX[0]), 3, FALSE);
  823. SHOTERM (LOC(PFERMSG), 3, TRUE);
  824. RETURN;
  825.  
  826. END #PFERR#;
  827. CONTROL EJECT;
  828.  
  829. PROC CAT$LIST;
  830.  
  831. BEGIN
  832.  
  833. UN2 = USERNUM;
  834.  
  835. FOR TCSTAT = 0 WHILE MORE$2$DO DO
  836. BEGIN
  837. TIGRLST;
  838. TCSTAT = TCSTAT LAN O"1777";
  839. FOR J1 = 0 STEP 16 WHILE J1 LS TCLEN DO
  840. BEGIN
  841. PFLIST[NDXPF] = XSFW(TBUFNAM[J1]);
  842. TOTPRU = TOTPRU + TBUFCNT[J1+1];
  843. LINX[0] = SPACES;
  844. C<1,8>LINX[0] = C<0,8>PFLIST[NDXPF];
  845. EDITX = XCDD (TBUFCNT[J1+1]);
  846. LINX[1] = EDITX;
  847. TBUFTYP[J1+7] = "IND";
  848. PFTYPE[NDXPF] = IND;
  849. IF (TBUF[J1+1] LAN O"4000") NQ 0 THEN
  850. BEGIN
  851. TBUFTYP[J1+7] = "DIR";
  852. PFTYPE[NDXPF] = DIR;
  853. END
  854. C<0,3>LINX[1] = TBUFTYP[J1+7];
  855. IF (NOT SHORT) THEN SHOTERM (LOC(LINX[0]), 2, FALSE);
  856. NDXPF = NDXPF +1;
  857. PFLIST[NDXPF] = 0;
  858. END
  859. MORE$2$DO = TCSTAT NQ STATEOI;
  860. IF NDXPF GQ 96 THEN MORE$2$DO = FALSE;
  861.  
  862. END
  863.  
  864. IF TCSTAT EQ STATEOI THEN
  865. BEGIN
  866. LINX[0] = " TOTAL = ";
  867. LINX[1] = XCDD (TOTPRU);
  868. SHOTERM (LOC(LINX[0]), 2, TRUE);
  869. END
  870. END #CAT$LIST#
  871. CONTROL EJECT;
  872.  
  873. #COPY$ONE FILE#
  874. PROC COPY$ONE;
  875.  
  876. BEGIN
  877.  
  878. PFN1 = PFLIST[INDX1];
  879.  
  880. IF IN$RANGE THEN
  881. BEGIN
  882.  
  883. STRIP55(PFN1);
  884. C<0,4>PFN2 = "DUMP";
  885. IF C<0,2>PFN1 EQ "NP" THEN C<0,4>PFN2 = "DUNP";
  886. IF PFTYPE[INDX1] EQ IND THEN CPYGET;
  887. IF PFTYPE[INDX1] EQ DIR THEN CPYATT;
  888.  
  889. SHOW$STAT (PFN1, "ACC", PFTYPE[INDX1]);
  890.  
  891. IF (NOT PFERR(PFN1)) THEN
  892. BEGIN
  893. IF FL2SAVE THEN
  894. BEGIN
  895. CPYFLS;
  896. LINX[0] = " COPIED ";
  897. LINX[1] = PFLIST[INDX1];
  898. SHOTERM (LOC(LINX[0]), 2, TRUE);
  899. END
  900. IF FL2PURGE THEN
  901. BEGIN
  902. CPYRET;
  903. PFN1 = PFLIST[INDX1];
  904. STRIP55(PFN1);
  905. CPYPUR;
  906. SHOW$STAT (PFN1, "PUR", PFTYPE[INDX1]);
  907. IF (NOT PFERR(PFN1)) THEN N = N;
  908. END
  909. END
  910.  
  911. CPYRET;
  912.  
  913. END
  914.  
  915. END #COPY$ONE#
  916. CONTROL EJECT;
  917.  
  918. #FIND/COPY FILES #
  919. PROC COPY$FILES;
  920.  
  921. BEGIN
  922.  
  923.  
  924. FOR J1 = 0 STEP 1 WHILE C<0,1>PFNC1C2[J1] NQ 0 DO
  925. BEGIN
  926. J3 = 0;
  927. IF C<0,2>PFNC1C2[J1] EQ "NP" THEN J3 = 20;
  928. FOR J2 = J3 STEP 1 WHILE C<0,1>PFNC3[J2] NQ 0 DO
  929. BEGIN
  930. SCANF = SPACES;
  931. C<0,2>SCANF = PFNC1C2[J1];
  932. C<2,1>SCANF = PFNC3[J2];
  933. LINX[0] = SPACES;
  934. LINX[1] = "SEARCH-- ";
  935. LINX[2] = SCANF;
  936. IF (NOT SHORT) THEN SHOTERM (LOC(LINE), 3, TRUE);
  937. FOR INDX1 = 0 STEP 1 WHILE INDX1 LS NDXPF DO
  938. IF C<0,3>SCANF EQ C<0,3>PFLIST[INDX1] THEN COPY$ONE;
  939. END
  940. END
  941.  
  942. END #COPY$FILES#
  943. *IF DEF,CDCNET
  944. CONTROL EJECT;
  945.  
  946. PROC CPYMDIDUMP;
  947.  
  948. #
  949. * COPY ONE MDI DUMP FILE
  950. #
  951.  
  952. BEGIN
  953.  
  954. ITEM NFMRC U;
  955.  
  956. PFN1 = PFLIST[INDX1];
  957. IF IN$RANGE
  958. THEN BEGIN
  959. C<0,4>PFN2 = "DMDI";
  960. FOR K1 = 0 STEP 1 UNTIL 30 DO
  961. NFMWORD[K1] = 0;
  962. NFMLFN[0] = "CPYFL1";
  963. NFMPFN[22] = PFN1;
  964. NETFMA (LOC (NETFMBLOCK),NFMRC);
  965. NFMSTAT[22] = NFMRC;
  966. SHOW$STAT (NFMWORD[22], "ATT", NFM);
  967. IF NFMRC EQ 0
  968. THEN BEGIN
  969. IF FL2SAVE
  970. THEN BEGIN
  971. CPYFLS;
  972. LINX[0] = " COPIED ";
  973. LINX[1] = PFLIST[INDX1];
  974. SHOTERM (LOC(LINX[0]), 2, TRUE);
  975. END
  976. IF FL2PURGE
  977. THEN BEGIN
  978. CPYRET;
  979. NFMSTAT[22] = 0;
  980. NETFMP (LOC (NETFMBLOCK),NFMRC);
  981. NFMSTAT[22] = NFMRC;
  982. SHOW$STAT (NFMWORD[22], "PUR", NFM);
  983. END
  984. END
  985.  
  986. ELSE
  987. BEGIN
  988. # COULD NOT HAVE ACCESS TO THE FILE THROUGH NETFM. #
  989. # GO AHEAD TRY TO CELLECT (AND/OR PURGE) IT DIRECTLY #
  990. # WITHOUT CALLING NETFM. #
  991.  
  992. PFN1 = PFLIST[INDX1];
  993. STRIP55(PFN1);
  994.  
  995. IF PFTYPE[INDX1] EQ IND # IF THIS IS AN INDIRECT #
  996. THEN # ACCESS FILE , GET IT. #
  997. CPYGET;
  998. ELSE # OTHERWISE, IT MUST BE #
  999. CPYATT; # DIRECT ACCESS, ATTACH IT. #
  1000.  
  1001. IF (NOT PFERR(PFN1)) THEN # IF NO ERROR IN ACCESS TO #
  1002. BEGIN # THE FILE, PROCESS IT. #
  1003. IF FL2SAVE THEN # IF NOSAVE IS NOT SPECIFIED#
  1004. BEGIN
  1005. CPYFLS;
  1006. LINX[0] = " COPIED ";
  1007. LINX[1] = PFLIST[INDX1];
  1008. SHOTERM (LOC(LINX[0]), 2, TRUE);
  1009. END
  1010.  
  1011. IF FL2PURGE THEN # IF NOPURGE IS NOT SPECIFIED #
  1012. BEGIN
  1013. CPYRET; # RETURN THE FILE #
  1014. PFN1 = PFLIST[INDX1];
  1015. STRIP55(PFN1);
  1016. CPYPUR; # PURGE THE FILE #
  1017. SHOW$STAT (PFN1, "PUR", PFTYPE[INDX1]);
  1018. END
  1019. END
  1020. END
  1021.  
  1022. CPYRET;
  1023.  
  1024. END
  1025.  
  1026. END # CPYMDIDUMP #
  1027. CONTROL EJECT;
  1028.  
  1029. PROC CPYMDIDMPS;
  1030.  
  1031. #
  1032. * THIS PROC VISITS EVERY FILE NAME IN PFLIST ONCE. IF A FILE NAME
  1033. * STARTS WITH SOMETHING IN THE RANGE DI..D9, IT WILL CALL CPYMDIDUMP
  1034. * TO COLLECT (AND/OR PURGE) THE FILE.
  1035. #
  1036.  
  1037. BEGIN
  1038.  
  1039. ITEM DI C(10) = "DI";
  1040. ITEM D9 C(10) = "D9";
  1041.  
  1042. FOR INDX1 = 0 STEP 1 WHILE INDX1 LS NDXPF DO
  1043. BEGIN
  1044. IF ( B<0,12>PFLIST[INDX1] GQ B<0,12>DI ) AND
  1045. ( B<0,12>PFLIST[INDX1] LQ B<0,12>D9 )
  1046. THEN
  1047. CPYMDIDUMP;
  1048. END
  1049. END # CPYMDIDMPS #
  1050. *ENDIF
  1051.  
  1052. CONTROL EJECT;
  1053. # PROC COLLECT #
  1054. # (MAIN PROCESS) #
  1055.  
  1056. *IF DEF,CDCNET
  1057. NETCDA ($DEFAULT,$CURRENT); #USE NETDIR IN THE CURRENT USER #
  1058. *ENDIF
  1059. SETUP$CLCT;
  1060. PFN2 = "DUMPVVV";
  1061. C<4,3>PFN2 = C<4,3>NETINV;
  1062. UN2 = USERNUM;
  1063. UN1 = USERNUM;
  1064. STRIP55(UN1);
  1065. STRIP55(UN2);
  1066. STRIP55(PFN2);
  1067. IF FL2SAVE THEN
  1068. BEGIN
  1069. CPYOPN; # OPEN DUMPXXX FILE - ALL BUT NP/MDI FILES #
  1070. SHOW$STAT (PFN2, "OPN", DIR);
  1071. C<0,4>PFN2 = "DUNP";
  1072. CPYOPN; # OPEN DUNPXXX FILE - NP DUMP FILES #
  1073. SHOW$STAT (PFN2, "OPN", DIR);
  1074. *IF DEF,CDCNET
  1075. C<0,4>PFN2 = "DMDI";
  1076. CPYOPN; # OPEN DMDIXXX FILE - MDI DUMP FILES #
  1077. SHOW$STAT (PFN2, "OPN", DIR);
  1078. *ENDIF
  1079. C<0,4>PFN2 = "DUMP";
  1080. END
  1081.  
  1082. FOR TCSTAT = 0 WHILE TCSTAT NQ STATEOI DO
  1083. BEGIN
  1084. NDXPF = 0;
  1085. MORE$2$DO = TRUE;
  1086. CAT$LIST;
  1087. COPY$FILES;
  1088. *IF DEF,CDCNET
  1089. CPYMDIDMPS;
  1090. *ENDIF
  1091. END
  1092.  
  1093. C<0,4>PFN2 = "DUMP";
  1094. IF FL2SAVE THEN CPYSAV;
  1095. C<0,4>PFN2 = "DUNP";
  1096. IF FL2SAVE THEN CPYSAV;
  1097. *IF DEF,CDCNET
  1098. C<0,4>PFN2 = "DMDI";
  1099. IF FL2SAVE THEN CPYSAV;
  1100. *ENDIF
  1101.  
  1102. SIERRA;
  1103. NR2 = SIECPUS * 1000.0;
  1104. NR2 = NR2 + SIECPUMS;
  1105. NR2 = NR2 - NR1;
  1106. J2 = NR2;
  1107. EDITX = XCFD(J2);
  1108. OPMSG[0] = " CPU MS REQD ";
  1109. OPMSG1[2] = EDITX;
  1110. OPMSGZB[3] = 0;
  1111. SENDMSG;
  1112. SHOTERM (LOC(OPMSG[0]), 3, TRUE);
  1113.  
  1114. OFLUSH;
  1115. FINSHIO;
  1116.  
  1117.  
  1118.  
  1119.  
  1120. END #COLLECT#
  1121.  
  1122. TERM
  1123. *CWEOR,0
cdc/nos2.source/nam5871/collect.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator