PROCEDURE  rambo2 (
  number_of_jobs, noj   : integer = 20
  number_of_passes, nop : integer = 20
  family, f             : name = testing
  user, u               : name = $system
  shared, s             : boolean = false
  status)

  path = ':' // $string(family) // '.' //$string(user) // '.test_'
  shared_access = $string(shared)
  IF shared THEN
   open_mode = 'amp$open'
  ELSE
   open_mode = 'fsp$open_file'
  IFEND

  FOR i = 1 TO number_of_jobs DO
    job_number_string = $strrep(i)
    file_string = path // job_number_string
    JOB sm='?'   jn =$name('RAMBO'//$strrep(i))
      system_operator_utility
      crev ign k=status
      crev unq k=string v=$unique
      copf $system.osf$builtin_library $local.built  status=ign
      setcl a=$local.built status=ign
      setcl a=$user.dfcc.object.maintenance.osf$builtin_library status=ign
      FOR j1 = 1 TO ?$strrep(number_of_passes)? DO
        delf ?file_string? status=ign
        IF ?shared_access? THEN
          create_file ?file_string?
          detach_file ?file_string?
          attach_file ?file_string? am=all sm=all
        IFEND
        dfp$ptu ?file_string? w m=n rfn=$fname(unq) s=?job_number_string?*100000  open=?open_mode?
        dfp$ptu ?file_string? r m=n rfn=$fname(unq) open=?open_mode?
        dfp$ptu ?file_string? w m=s rfn=$fname(unq) s=?job_number_string?*100000  open=?open_mode?
        dfp$ptu ?file_string? r m=s rfn=$fname(unq) open=?open_mode?
      FOREND
      quit " sou "
    JOBEND
  FOREND

PROCEND rambo2
