home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / cdcr206a.zip / CDMENU.CMD < prev    next >
OS/2 REXX Batch file  |  1995-10-29  |  15KB  |  43 lines

  1. /*                           CD Carousel                                   */
  2. /*                         by Bill Esposito                                */
  3. /*                              v2.06a                                     */  
  4. /*                       The Cereal Port BBS                               */
  5. /*                            1:132/152                                    */
  6. /*                          (603)899-3335                                  */
  7. /*                                                                         */
  8. /*                         Magic name 'CDCAR'                              */
  9. /*                         for latest version                              */
  10. /*                                                                         */
  11. /* *********************************************************************** */
  12. /* DISCLAIMER:  This software is provided "AS IS" without any warranty of  */
  13. /* any kind, either expressed or implied.  USE IT AT YOUR OWN RISK.        */
  14. /*                                                                         */
  15. /* Copyright 1993, 1994, 1995 by Bill Esposito.  This program is SHAREWARE.*/
  16. /* Please read the file SHAREWRE.TXT included in this archive.             */
  17. /*                                                                         */
  18. /* CD Carousel and it's support programs are not to be modified or         */
  19. /* distributed in modified form without the express written permission of  */
  20. /* The author, Bill Esposito.                                              */
  21. /* *********************************************************************** */
  22. /*                     *****  CDMENU.CMD  *****                            */
  23. /* The CD Carousel Menu program.                                           */
  24. /*                                                                         */
  25. /***************************************************************************/
  26. Arg task3;if task3 = '' then do;say 'Syntax:  cdmenu <Task No>';say 'Example: cdmenu 01';signal end;end      ;config=cdcar''task3'.cfg';ver='v2.06a';f=1;filled=0;do until lines(config)=0;  param.f=linein(config);  f=f+1;end;ok=stream(config,c,'close');parse var param.1 default junk;parse var param.3 homedir junk;parse var param.5 download junk;parse var param.6 fnum junk;parse var param.7 type junk
  27. parse var param.8 marea junk;parse var param.9 tnode junk;parse var param.10 fnode junk;parse var param.11 sysopfirst sysoplast nextname nextname2 junk;parse var param.15 pl;        grn='';        yel='';        red='';        blu='';        cyan='';        brt='';        gry='';        lo='';if left(sysoplast,1)=';' then sysoplast='';if nextname <>'NEXTNAME' then if left(nextname,1)<>';' then sysoplast=sysoplast nextname;if left(nextname,1)<>';' then if nextname2 <>'NEXTNAME2' then if left(nextname2,1)<>'' then sysoplast=sysoplast nextname2;;call RxFuncAdd 'SysloadFuncs','RexxUtil','Sysloadfuncs';call sysloadfuncs;menu:
  28.  reg1=sysopfirst sysoplast; reg2='* Registered to 'reg1' *'; reglgn=(length(reg2)/2); position=trunc(40-reglgn); posit=''position'H'; reg3=posit||reg2;;say'HOS/2OS/2OS/2OS/2OS/2';say'1HOS/2OS/2OS/2OS/2OS/2OS/2OS';say'7H/2OS/2OS/2OS/2OS/2OS/2OS/2OS';say'5H/2OS/2HS   0HOH/0HSH20H';say'0H/HO0HCD Carousel Door0H2H';say'HS5H'ver'0HOH/1H 4H    ';say'0HBy Bill Esposito   0HSH29H**';say'2HUNREGISTERED5H**0H/HO9H';say'9H                 0H21HS3H'        ;say'11H                            40H  80HO';say'1H/30HSet-up new cd80HS';say'1H225H                              80H/';say'1HO30HFill file requests80H2'
  29. say'1HS27H                          80H';say'80HO1H/28H 30HLocal ';say'36HCD Carousel48H 80HS1H2';say'28H                           80H/1HO';say'30HReview error log80H21HS';say'26H                      80HO1H/';say'30HQuit     49H 80HS1H2';say'31H           80H/1HO30HSelect:80H2';say'1HS80HO1H/2OS/2OS/2OS/2OS/2';say'19HOS/2OS/2OS/2OS/2OS/2OS/2O';say'44HS/2OS/2OS/2OS/2OS/2OS/2OS/2';say'71HOS/2OS/2OS1H';;call syscurpos 20, 36;pull select;;if select='S' then call cdconvrt.cmd task3 1;selec:;if select='F' then do;call syscurpos 8, 3
  30. say '                                                             ';call syscurpos 9, 3;say '                                                             ';call syscurpos 10, 3;say '                                                             ';call syscurpos 11, 3;say '                                                             ';call syscurpos 12, 3;say '                                                             ';call syscurpos 13, 3;say '                                                             ';call syscurpos 14, 3;say '                                                             ';call syscurpos 15, 3;say '                                                             ';call syscurpos 16, 3;say '                                                             ';call syscurpos 17, 3;say '                                                             ';call syscurpos 18, 3
  31. say '                                                             ';call syscurpos 19, 3;say '                                                             ';call syscurpos 20, 3;say '                                                             ';call syscurpos 21, 3;say '                                                             ';call syscurpos 10, 10;say brt||red'Enter node number in Hex format (ex. 00, 01, 02):';call syscurpos 10, 59;pull task1;if task1=''then task1=task3;if length(task1)=1 then task1='0'task1;if left(task1,1)>7 then signal bad;if left(task1,1)<0 then signal bad;if right(task1,1)>7 then signal bad;if right(task1,1)<0 then signal bad;if task1=''then task2=task3;else task2=task1;call sysfiletree homedir'cdcar'task2'.cfg', 'file.'
  32. if file.0=0 then do;say;say;say;bad:;call syscurpos 13, 10;say brt||yel'That node number does not exist, please select another'  ;do wait=1 to 5000;nop;end;select='F';signal selec;end;end;if select='F' then call cdmaint.cmd task2 1;sele:;if select='L' then do;/*call syscurpos 20, 10;say brt||red'Enter node number in Hex format (ex. 00, 01, 02):';call syscurpos 20, 59*/
  33. call syscurpos 8, 3;say '                                                             ';call syscurpos 9, 3;say '                                                             ';call syscurpos 10, 3;say '                                                             ';call syscurpos 11, 3;say '                                                             ';call syscurpos 12, 3;say '                                                             ';call syscurpos 13, 3;say '                                                             ';call syscurpos 14, 3;say '                                                             ';call syscurpos 15, 3;say '                                                             ';call syscurpos 16, 3;say '                                                             ';call syscurpos 17, 3;say '                                                             '
  34. call syscurpos 18, 3;say '                                                             ';call syscurpos 19, 3;say '                                                             ';call syscurpos 20, 3;say '                                                             ';call syscurpos 21, 3;say '                                                             ';call syscurpos 10, 10;say brt||red'Enter node number in Hex format (ex. 00, 01, 02):';call syscurpos 10, 59;;pull task1;if task1=''then task1=task3;/*if task1 = '' then signal default*/;if length(task1)=1 then task1='0'task1;if left(task1,1)>7 then signal bad1;if left(task1,1)<0 then signal bad1;if right(task1,1)>7 then signal bad1;if right(task1,1)<0 then signal bad1
  35. default:;if task1=''then task2=task3;else task2=task1;call sysfiletree homedir'cdcar'task2'.cfg', 'file.';if file.0=0 then do;cls;say;say;say;bad1:;call syscurpos 13, 10;say brt||yel'That node number does not exist, please select another'  ;do wait=1 to 5000;nop;end;select='L';signal sele;end;end;say select
  36. if select='L' then call cdcar homedir task2 1 1 14400 sysopfirst sysoplast ;if select='R' then call logs;if select='Q' then call quit;if select<>'S' then if select<>'F' then if select<>'L' then if select<>'Q' then call menu; quit:                                             ; exit                                           ;logs:;say'HOS/2OS/2OS/2OS/2OS/2';say'1HOS/2OS/2OS/2OS/2OS/2OS/2OS/';say'8H2OS/2OS/2OS/2OS/2OS/2OS/2OS/2';say'7HOS/2HS   0HOH/0HSH20H/';say'HO0HCD Carousel Door0H2HS';say'1H    'ver'      0HOH/1H 4H    0H';say'0HBy Bill Esposito   0HSH28H   9H**' ;say'2HUNREGISTERED5H**0H/HO';say'9H                 0H21HS3H';say'11H                            40H  80HO';say'1H/30HError log80HS1H2';say'25H                              80H/1HO';say'30HRequest log       80H21HS'
  37. say'27H                          80HO1H/';say'28H 30HFill from error log77H';say'80HS1H228H                           80H/';say'1HO30H                      80H2';say'1HS26H            '      ;say'44H    80HO1H/30HQuit     49H';say'49H 80HS1H231H           80H/1H';say'1HO30HSelect:80H21HS80HO1H/2';say'3HOS/2OS/2OS/2OS/2OS/2OS/2OS/2';say'31HOS/2OS/2OS/2OS/2OS/2OS/2';say'55HOS/2OS/2OS/2OS/2OS/2OS/2';say'79HOS1H';;;call syscurpos 20, 36;pull select;if select='E' then call errors;if select='R' then call errors;if select='Q' then call menu;if select='f' then call fill
  38. ;;                                                ; errors:                                        ; /* Read */                                     ;                                                ; read:                                          ; ; if select = 'E' then eye=10; else eye=23                       ; if select = 'E' then file=homedir'errors.log'                       ; if select = 'F' then file=homedir'errors.log'                       ; if select = 'R' then file=homedir'request.log'                       ; if select = 'E' then type='Error'                       ; if select = 'R' then type='Request'                       ; if select = 'F' then type='Fill'                       ; ok=stream(file,c,'close')                      ; call sysfiletree file, 'err.', 'F'             ; if err.0=0 then call qdel                      ; x=1                                            
  39.  loop:                                          ; y='1'                                          ; linein(file,1,0)                               ; '@cls'                                         ; loop2:                                         ; do until x > eye                                ; parse value linein(file) with disk nmi alias user level loc fulldirectory filename date time desc; say disk nmi alias user level loc fulldirectory filename date time desc        ; if type='Fill' then do;    say;    say 'Do you want to fill this request? (y,N)';    pull fy;    if left(fy,1)='Y' then call lineout homedir''disk'.r'task3, nmi alias user level loc fulldirectory filename date time desc                   ;    if left(fy,1)<>'Y' then call lineout homedir'errors.tmp', disk nmi alias user level loc fulldirectory filename date time desc ;    if left(fy,1)='Y' then filled=1 ;end; if lines(file)=''0'' then call qdel            ; /*  say 'Press the <ENTER> key to continue'    ;   pull enter                                   ;   call qdel                                    
  40.  end     */                                     ;                                    ;   x=x+y;   end;   more:;     x=1;      say 'more? (Y,n)';       pull yn;       if yn='N' then call qdel;        else;   call loop2;   call qdel;   qdel:;   ok=stream(file,c,'close');   if err.0=1 then do;     say;     say brt||yel'Do you want to delete the 'type' Log? (y,N)'cyan;     pull yn;     if yn='Y' then del file;     if type='Fill' then do
  41.      ok=stream('errors.log',c,'close');     ok=stream('errors.tmp',c,'close');     '@copy errors.tmp errors.log >nul';     '@del errors.tmp >nul';     end;   end;   if err.0=0 then do;     '@cls';     say;     say brt||yel'There are no errors reported.' ;     say 'Press <ENTER> to continue.';  pull yn;end  ;if type = 'Fill' then if filled=1 then call cdmaint.cmd task3 1;call logs;more1:;say 'more? (Y,n)';pull yn;if yn='N' then if select='E' then signal logs;if yn='N' then if select='R' then signal logs
  42. if yn='N' then call menu;;end:;exit ;;IN.351;IN.352;IN.353;IN.354;IN.355;IN.356;IN.357;IN.358;IN.359;IN.360;IN.361;IN.362;IN.363;IN.364;IN.365
  43.