× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Tim,

Our shop has an iseries (520 v5r4) and some NT servers with some shared
folders. Is there a way of reading/accessing the NT server files from the
iseries. Using the IFS is not a consideration.

The System i provides access to Windows machines through the IFS.

A lot of the time, when people refer to the "IFS" they're referring to the ability to store PC-like files on the System i. However -- that's NOT what I'm talking about today. The IFS includes many different things, including the ability to access Windows NEworking (SMB) file shares, the ability to access Network File Systems (NFS), the ability to access optical drives, the ability to access other iSeries computers over the network, the ability to access traidtional iSeries objects (You know, "library/object" objects) and the ability to store PC-style (stream) files on the system i hard drive... all of these completely different file systems are available through one integrated interface -- the "Integrated File System" (IFS) is the one interface!!

IT's not just for storing PC files on your System i! It's for accessing Windows PCs over the network as well!

In the world of Windows, you might access a file using a UNC path like this:
    \\AcctServer\C\customers\5412\Letter20061210.doc

To access the same document from the iSeries, you change the path around a little bit. Instead of starting with \\, you start it with /QNTC. And you use forward slashes instead of backward ones. So to access the same file from an RPG program, you'd use the name:

    /QNTC/AcctServer/C/customers/5412/Letter20061210.doc

You must use that from the IFS interface. From an RPG program, if you want to check if that file exists, you could use:

D filename        s            500A

 /free
   filename = '/QNTC/AcctServer/C/customers/5412/'
            + 'Letter20061210.doc';

   if (access(%trimr(filename): F_OK) = 0);
       // file exists!
   endif;

Obviously, you'd also need to create a prototype for the access() API.
(But, it'd work!) For more info on IFS programming, please see the following document:

   http://www.scottklement.com/rpg/ifs.html

To launch Word, Excel, etc... well, those programs don't run on the iSeries! You'd need to run them on the PC. You could send a remote command to the PC, though. You could do something like this:

D QCMDEXC         PR                  ExtPgm('QCMDEXC')
D    command                 32702A   const options(*varsize)
D    len                        15p 5 const

D cmd             s            500A   varying

 /free
      cmd = 'STRPCO';
      callp(e) QCMDEXC(cmd: %len(cmd));

      cmd = 'STRPCCMD PCCMD(''start winword "\\AcctServer\C\'
          + 'customers\5412\Letter20061210.doc"'')';
      QCMDEXC(cmd: %len(cmd));

I don't currently have access to my iSeries -- I'm typing this from memory -- so I may not have everything 100% right, but maybe the above info will help you get started (or at least give you some command names to search for information about.)

Also, if you remove the "winword" from the MS-DOS "start" command, it'll search for the best program to use for the file you've given.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.