midrange.com code scratchpad
Name:
DrillDown(DirectoryName); // MCH1210 error here!!!!!
Scriptlanguage:
Plain Text
Tabwidth:
4
Date:
11/20/2012 08:08:44 pm
IP:
Logged
Description:
The user was to lazy to give a description
Code:
  1.       // Create an indirect stream file of a list of files to pipe into Domino
  2.       // commands like COMPACT, etc.
  3.      H DFTACTGRP(*NO) BNDDIR('QC2LE')
  4.  
  5.      FQSYSPRT   O    F  132        PRINTER
  6.  
  7.       /copy routines/qrpglesrc,ifsio_h
  8.  
  9.      D name            s            132A
  10.      D shortname       s             52A
  11.      D msg             s            132A
  12.  
  13.      D strerror        pr              *   ExtProc('strerror')
  14.      D errno_val                     10I 0 value
  15.  
  16.      D get_errno       pr              *   ExtProc('__errno')
  17.  
  18.      D p_errno         s               *
  19.      D errno           s             10I 0 based(p_errno)
  20.  
  21.      D CRTINDSTMF      pr                  extpgm('CRTINDSTMF')                 *entry plist
  22.      D  DirectoryName               640a
  23.      D CRTINDSTMF      pi                                                       *entry plist
  24.      D  DirectoryName               640a
  25.  
  26.      D DrillDown       pr
  27.      D  DrillDownDir                       like(DirectoryName)
  28.  
  29.      D up              C                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  30.      D lo              C                   'abcdefghijklmnopqrstuvwxyz'
  31.  
  32.       /free
  33.        *inlr=*on;
  34.        // ignore parameter until we figure out a way to ignore trailing junk
  35.        DirectoryName='/GDISYS01/NOTES/DATA';
  36.        DirectoryName=%trim(DirectoryName) + X'00'; // null terminate the string
  37.        DrillDown(DirectoryName); // MCH1210 error here!!!!!
  38.       /end-free
  39.  
  40.      Oqsysprt   E            error          1
  41.      O                       msg                132
  42.      O          e            print          1
  43.      O                       name               132
  44.  
  45.      P DrillDown       B
  46.      D DrillDown       PI
  47.      D  DrillDownDir                       like(directoryName)
  48.  
  49.      d dirh            s               *
  50.  
  51.      d p_entry         s               *
  52.      d entry           ds                  likeds(dirent)
  53.      d                                     based(p_Entry)
  54.       /free
  55.        // Open the directory
  56.        dirh = opendir(DrillDownDir);
  57.        if (dirh = *NULL);
  58.          p_errno = get_errno();
  59.          msg = 'opendir(): ' + %str(strerror(errno));
  60.          except error;
  61.          return;
  62.        endif;
  63.  
  64.        // ------------------------------------------
  65.        // read entries and print them
  66.        // ------------------------------------------
  67.        p_entry = readdir(dirh);
  68.        dow ( p_entry <> *NULL );
  69.          name = %subst(entry.d_name: 1: entry.d_namelen);
  70.          if %xlate(lo:up:%subst(name:entry.d_namelen-3:4))='.NSF';
  71.            except print;
  72.          Endif;
  73.          p_entry = readdir(dirh);
  74.        enddo;
  75.  
  76.        callp closedir(dirh);
  77.       /end-free
  78.      P DrillDown       E
  79.  
© 2004-2019 by midrange.com generated in 0.006s valid xhtml & css