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:
- // Create an indirect stream file of a list of files to pipe into Domino
- // commands like COMPACT, etc.
- H DFTACTGRP(*NO) BNDDIR('QC2LE')
-
- FQSYSPRT O F 132 PRINTER
-
- /copy routines/qrpglesrc,ifsio_h
-
- D name s 132A
- D shortname s 52A
- D msg s 132A
-
- D strerror pr * ExtProc('strerror')
- D errno_val 10I 0 value
-
- D get_errno pr * ExtProc('__errno')
-
- D p_errno s *
- D errno s 10I 0 based(p_errno)
-
- D CRTINDSTMF pr extpgm('CRTINDSTMF') *entry plist
- D DirectoryName 640a
- D CRTINDSTMF pi *entry plist
- D DirectoryName 640a
-
- D DrillDown pr
- D DrillDownDir like(DirectoryName)
-
- D up C 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- D lo C 'abcdefghijklmnopqrstuvwxyz'
-
- /free
- *inlr=*on;
- // ignore parameter until we figure out a way to ignore trailing junk
- DirectoryName='/GDISYS01/NOTES/DATA';
- DirectoryName=%trim(DirectoryName) + X'00'; // null terminate the string
- DrillDown(DirectoryName); // MCH1210 error here!!!!!
- /end-free
-
- Oqsysprt E error 1
- O msg 132
- O e print 1
- O name 132
-
- P DrillDown B
- D DrillDown PI
- D DrillDownDir like(directoryName)
-
- d dirh s *
-
- d p_entry s *
- d entry ds likeds(dirent)
- d based(p_Entry)
- /free
- // Open the directory
- dirh = opendir(DrillDownDir);
- if (dirh = *NULL);
- p_errno = get_errno();
- msg = 'opendir(): ' + %str(strerror(errno));
- except error;
- return;
- endif;
-
- // ------------------------------------------
- // read entries and print them
- // ------------------------------------------
- p_entry = readdir(dirh);
- dow ( p_entry <> *NULL );
- name = %subst(entry.d_name: 1: entry.d_namelen);
- if %xlate(lo:up:%subst(name:entry.d_namelen-3:4))='.NSF';
- except print;
- Endif;
- p_entry = readdir(dirh);
- enddo;
-
- callp closedir(dirh);
- /end-free
- P DrillDown E
-
|
|
|