home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / cdrom / rexxcd / rexx / debug.rexx < prev    next >
OS/2 REXX Batch file  |  1977-12-31  |  3KB  |  133 lines

  1. /*
  2.     Name        :    debug.rexx
  3.     Created        :    24/06/96
  4.     Last change    :    25/06/96
  5.  
  6.     Programmer    :    Urban Lindeskog
  7.     Organization    :    ProNotion SWDG
  8.  
  9.  
  10.     Creates a file with information about the CD drive
  11.     and the system configuration.
  12.  
  13.     Reports about some potential errors in the settings.
  14.  
  15. */
  16. OPTIONS RESULTS
  17.  
  18. if ~show('l','rexxsupport.library') then do
  19.     addlib('rexxsupport.library',0,-30,0)
  20. end
  21.  
  22. say ''
  23. say 'This program will create a file called "RexxCD.debuginfo"'
  24. say 'If RexxCD have problems with your CD drive, please send'
  25. say 'this file to me so I can resolve the problem.'
  26. say ''
  27.  
  28. if ~show('p','REXXCD') then do
  29.     say 'RexxCD is not running.'
  30.     say 'Start RexxCD and try again.'
  31.     say ''
  32.     exit
  33. end
  34.  
  35. ADDRESS REXXCD
  36.  
  37. if open(fh, "RexxCD.debuginfo", 'W') then do
  38.     address REXXCD
  39.  
  40.     GETATTR APPLICATION STEM APPLICATION
  41.     call writeln(fh, '<--APPLICATION-->')
  42.     call writeln(fh, APPLICATION.VERSION)
  43.     call writeln(fh, APPLICATION.SCREEN'<')
  44.  
  45.     GETATTR SETTINGS STEM SETTINGS
  46.     call writeln(fh, '<--SETTINGS-->')
  47.     call writeln(fh, SETTINGS.REPEAT)
  48.     call writeln(fh, SETTINGS.ALLOWMACROS)
  49.     call writeln(fh, SETTINGS.TOCPATH'<')
  50.  
  51.     GETATTR DEVICE STEM DEVICE
  52.     call writeln(fh, '<--DEVICE-->')
  53.     call writeln(fh, DEVICE.NAME'<')
  54.     call writeln(fh, DEVICE.UNIT)
  55.  
  56.     GETATTR DRIVE STEM DRIVE
  57.     call writeln(fh, '<--DRIVE-->')
  58.     call writeln(fh, DRIVE.NAME'<')
  59.     call writeln(fh, DRIVE.VENDOR'<')
  60.     call writeln(fh, DRIVE.REVISION'<')
  61.     call writeln(fh, DRIVE.PRIVATE'<')
  62.     call writeln(fh, DRIVE.STATUS)
  63.     call writeln(fh, DRIVE.TYPE)
  64.     call writeln(fh, DRIVE.BPS)
  65.     call writeln(fh, DRIVE.STEREO)
  66.  
  67.     GETATTR VOLUME STEM VOLUME
  68.     call writeln(fh, '<--VOLUME-->')
  69.     call writeln(fh, VOLUME.LEFT)
  70.     call writeln(fh, VOLUME.RIGHT)
  71.     call writeln(fh, '<---->')
  72.  
  73.     call close(fh)
  74.     end
  75. else do
  76.     say 'Could not create "RexxCD.debuginfo"!'
  77.     say 'Please check, and try again.'
  78.     exit
  79.     end
  80.  
  81. if DRIVE.TYPE ~= 5 then do
  82.     say '---NOTE---'
  83.     say 'This SCSI unit does not seem to be a CD ROM drive.'
  84.     say ''
  85.     end
  86.  
  87. if DRIVE.STATUS > 3 then do
  88.     say '---NOTE---'
  89.     say 'This unit reports an unknown status number.'
  90.     say ''
  91.     end
  92.  
  93. if DEVICE.NAME=='' then do
  94.     say '---NOTE---'
  95.     say 'It appears that the SCSI device name is not set'
  96.     say ''
  97.     end
  98.  
  99. if (DEVICE.UNIT < 0) | (DEVICE.UNIT > 6) then do
  100.     say '---NOTE---'
  101.     say 'The SCSI device unit number is out of the normal range (0-6)'
  102.     say 'The SCSI controller often occupies unit 7'
  103.     say ''
  104.     end
  105.  
  106. if EXISTS(SETTINGS.TOCPATH)~=1 then do
  107.     say '---NOTE---'
  108.     say 'The path specified for the data files does not exist.'
  109.     say ''
  110.     end
  111.  
  112. if VOLUME.LEFT~=VOLUME.RIGHT then do
  113.     say '---NOTE---'
  114.     say 'The stereo volume pairs are not at equal levels.'
  115.     say 'Some CD drives requires both controls to be the same.'
  116.     say ''
  117.     end
  118.  
  119. if (VOLUME.LEFT+VOLUME.RIGHT)==0 then do
  120.     say '---NOTE---'
  121.     say 'The volume controls are set to zero.'
  122.     say 'This might explain something.'
  123.     say ''
  124.     end
  125.  
  126. if find(DRIVE.VENDOR, 'NEC')>0 then do
  127.     say '---NOTE---'
  128.     say 'This appears to be a NEC drive. Those drives seem'
  129.     say 'to be some creatures of their own.'
  130.     say ''
  131.     end
  132.  
  133.