![]() |
Chapter 19. Using the QNetWare File System ![]() The QNetWare file system provides access to NetWare files, directories, and NetWare Directory Services (NDS) objects through the AS/400 integrated file system (IFS). This chapter describes how you can access the NetWare file system from the AS/400 by using the QNetWare file system. Integrated File System Introduction Some of the file systems that you can access through the common interface of the integrated file system are the following:
For more information about the integrated file system, and for a complete
list of possible file systems you can access through the common interface
of the integrated file system, see theIntegrated File System Introduction
book.
QNetWare File System Introduction You can use the QNetWare file system to:
QNetWare Directory Structure QNetWare file system provides a hierarchical directory structure that allows users and application programs to access objects in the QNetWare directory on the AS/400. The QNetWare directory is at the root of the QNetWare file system. The QNetWare directory is only present when Enhanced Integration for NetWare is installed on the AS/400. QNetWare appears after the first IPL after the product is installed. You can create and manipulate NetWare files and directories that use QNetWare as the root directory through application program interfaces (APIs). APIs allow application programming and data sharing between workstations. The QNetWare file system is similar to other file systems; it uses directories and subdirectories to store data. This data can be accessed by CA/400 and AS/400 users. The /QNetWare directory structure represents multiple distinct file systems:
/QNetWare/SERVER.SVR/VOLUMEThe extension .SVR is used to represent a Novell NetWare server. /QNetWare/CORP_TREE.TRE/USA.C/ORG.O/ORG_UNIT.OU/SVR1_VOL.CNThe extensions .TRE, .C, .O, .OU, and .CN are used to represent NDS trees, countries, organizations, organizational units, and common names, respectively. If a Novell NetWare volume is accessed through the NDS path through a volume object, it's root directory is also automatically mounted on the NDS object. Figure 19-1 shows the QNetWare file system and the servers and trees associated with it. The QNetWare subdirectory contains entries for each NetWare server connected to the AS/400. Figure 19-1. QNetWare File System
A path name tells the system how to locate an object. The path name is expressed as a sequence of directory names followed by the name of the object. Individual directories and the object names are separated by a slash (/) or backslash (\) character; for example: directory1/fileThere is no difference between using the / or the \. Certain directories within the QNetWare file system represent resources, such as servers, volumes, and NDS trees within the network. Users cannot add or remove files or subdirectories from these directories. Changes to these directories occur when the system administrator changes the network by adding or removing a volume, for example, or by bringing a server online. Directories in which the user cannot directly make changes are the following: Table 19-1. Directories That the User Cannot
Change
|
File
and Directory Names
The QNetWare file system does not preserve the case in which files or directories are entered in a command or API. All names are set to upper case in transmission to the NetWare server. Novell NetWare also supports the namespaces of multiple platforms, such as DOS, OS/2, Apple** Macintosh**, and NFS. Even though NetWare supports these namespaces, it also requires unique DOS names on all NetWare volumes. For consistency, the QNetWare file system displays all files and directories using their DOS name. The QNetWare file system supports the display of NDS names in upper and lower case. LinksThe QNetWare file system supports only one link to an object. Symbolic links cannot be created or stored in QNetWare. However, symbolic links can be created in the "root" (/) or QOpenSys directories that point to a QNetWare file or directory.Object Security and the QNetWare File System Enhanced Integration for NetWare fully implements NetWare security and authenticates each user before allowing access to NetWare data. When you use AS/400 commands, APIs, or Client Access/400 to access the QNetWare file system, Enhanced Integration for NetWare maps security semantics between the AS/400 and NetWare. Files and directories in QNetWare are stored and managed by Novell NetWare servers. When using commands to display or change the authorities of either owners or users, QNetWare maps NetWare users to AS/400 users based on the user's name. Trustee assignments for files and directories on the NetWare server are mapped to the AS/400. This includes trustee assignments for groups, especially the group EVERYONE. The group EVERYONE is mapped as user *PUBLIC on the AS/400. Trustee assignments for users that do not have an AS/400 user profile are also mapped; however, if the NetWare name exceeds 10 characters, the authority is not mapped. Authorizing Users to Files and Directories After Enhanced Integration for NetWare is installed you must add authentication entries for each user or each user must start a connection to the NetWare server before the file system can be used. Use of authentication entries greatly enhances the usability of the QNetWare file system. You can change a user's authority to files and directories, by using the WRKAUT or CHGAUT commands. When authorizing users to NetWare files and directories keep in mind that rights to files and directories can be inherited from parent directories, and that a specific right will override an inherited right. Most of the time it is easier to authorize a user to a high-level parent directory and then control which authorities are allowed to flow down to lower level directories by using NetWare inherited rights filters. For more information, see the NetWare manuals. The NetWare inherited rights filter for a file or directory can also be changed through the WRKAUT or CHGAUT command, by specifying the *NTWIRF special value. A user's authority to a file or directory can be determined by the user running the DSPAUT command. The user's effective rights are displayed under the *NTWEFF special value. Although the user must have sufficient authority to the file or directory to run the DSPAUT command against it. The QNetWare file system changes the authority on the NetWare server, it does not maintain its own copy. When authorities are set or retrieved they are mapped between AS/400 authorities and NetWare rights. Table 19-2 maps the AS/400 authorities to NetWare rights. Table 19-3 maps the AS/400 authorities to NDS rights. When you use CHGAUT command, or when you copy files in and out of the QNetWare file system, security semantics are mapped between the AS/400 and NetWare. NetWare Authorities to Files and Directories NetWare files and directories are protected by the following rights:
|
![]() AS/400 authorities are mapped to NetWare rights, as follows: Table 19-2. AS/400 Authorities and NetWare
Rights
|
NetWare
Directory Services (NDS) Object Rights
NDS objects are protected by the following rights:
AS/400 authorities are mapped to NDS rights, as follows: Table 19-3. AS/400 Authorities and NDS Rights
|
NetWare
File Mode Support
NetWare uses file attributes to emulate file modes. Table 19-4 shows which attributes are set for owner permissions. Group and Others permissions are ignored. Table 19-4. NetWare File Attributes for Owner
Permissions
|
Object
Ownership
Owner's names are mapped to valid AS/400 owners. Where an owner's name cannot be mapped to a valid AS/400 owner, QDFTOWN is assigned. This can occur in the following cases:
You can use the CHGOWN command to transfer object ownership from one user to another. For example, the following command transfers the ownership of myfile from the current owner to NEWOWNER. CHGOWN OBJ('/QNetWare/server.svr/sys/myfile') NEWOWN(NEWOWNER)Auditing Although Novell NetWare supports the auditing of files and directories,
the QNetWare file system cannot change the auditing values of these objects.
Therefore, the CHGAUD command is not supported.
Using Integrated File System Commands and Menus To access the Integrated File System menu, type GO FILESYS. From the Integrated File System menu, you can select additional menus for operations on directories, objects and security. See "Integrated File System Commands" for a short description of each Integrated File System command you can use with the QNetWare file system. You can work with files and directories in the QNetWare file system using the integrated file system interface. The integrated file system interface is a set of menus, commands, and APIs provided by OS/400. Not all available operations can be used on the QNetWare file system, as described in this note. NetWare file systems located on NetWare servers can be mounted on the "root" (/), QOpenSys, and other file systems to make access easier and to perform better than under the /QNetWare directory. Otherwise, if you step through the QNetWare menus, the AS/400 searches every NetWare server on the network. Depending on the size of your network, this can be a slow process. Mounting NetWare file systems can also be used to take advantage of the options on the Add Mounted File System (ADDMFS) or MOUNT command, such as mounting a read-write file system as read-only. NetWare file systems can be mounted using an NDS path or by specifying a NetWare path in the form of SERVER/VOLUME:directory/directory. For example, to mount the directory NOTES located in volume LOTUS on server OFFICE, a user would use this syntax: OFFICE/LOTUS:NOTESThis path syntax is very similar to NetWare's MAP command syntax. NDS paths can be used to specify a path to a NetWare directory but cannot themselves be mounted. You can mount using NDS volume objects and directory map objects.
![]() You can use the MOUNT (or ADDMFS) command to mount a specific volume or directory from a NetWare server or NDS tree. This allows your applications to access data more directly. Before you mount a file system on the AS/400, you need to create a directory by using the MKDIR command. In the following examples, the temp1 directory has been created.
![]() This example shows how you can use the MOUNT command to mount the NetWare directory LOTSUITE/SMARTCTR contained in the volume LOTUS that resides on server RCHNWSVR1 over the directory /temp1. MOUNT TYPE(*NETWARE) MFS('RCHNWSVR1/LOTUS:LOTSUITE/SMARTCTR') MNTOVRDIR('/temp1')Mounting a NetWare File System by Using NDS Contexts When you use NDS contexts, the AS/400 searches for volumes by the context of the job first and of the AS/400 system (default) next. This example shows how you can use the MOUNT command to mount the NDS volume LOTUS_VOL by using an absolute context, over the directory /temp1. MOUNT TYPE(*NETWARE) MFS('.LOTUS_VOL.ROCHESTER.IBM') MNTOVRDIR('/temp1')This example shows how you can use the MOUNT command to mount the path LOTSUITE/SMARTCTR on NDS volume LOTUS_VOL, by using a relative path and fully-qualified names, over the directory /temp1. MOUNT TYPE(*NETWARE) MFS('CN=LOTUS_VOL.OU=ROCHESTER:LOTSUITE/SMARTCTR') MNTOVRDIR('/temp1')
![]()
|
In this example, the context for the job is changed to the NDS tree
CT_TREE.
CHGNDSCTX NDSCTX('.LOTUS_VOL.ROCHESTER') NDSTREE('CT_TREE')In this example, the context for the job is changed to the root directory. CHGNDSCTX NDSCTX(*ROOT)Mount Command Options You can use several options with the MOUNT command. The default value for the options string is: 'rw,acregmax=60, acdirmax=60'This specifies to mount as read-write, sets the maximum time to store file attributes locally to 60 seconds, and sets the maximum number of seconds to store directory attributes locally to 60 seconds. To mount a file system as read-only, use the option ro: MOUNT TYPE(*NETWARE) MFS('LOTUS/VOL:') MNTOVRDIR('/temp1') OPTIONS('ro')Using the DSPMFSINF Command You can use the DSPMFSINF command to display information about a specific file system. For example, you can determine if it is mounted over, and also display other information, such as the file system type, block size, caching values, and server code page. In this example, information about the temp1 file system is sent to the default printer. DSPMFSINF OBJ('/temp1') OUTPUT(*PRINT)Using the WRKAUT and CHGAUT Commands User's authorities can be displayed and changed by using the WRKAUT and CHGAUT commands. When authorities are transferred to and from the server they are mapped to AS/400 authorities. +--------------------------------------------------------------------------------+ | Change Authority (CHGAUT) | | | | Type choices, press Enter. | | | | Object . . . . . . . . . . . . . > '/qnetware/ntwserv.svr/vol1/KYLE/GB4.JPG' | | | | User . . . . . . . . . . . . . . > PAWOLF Name, *PUBLIC, *NTWIRF | | + for more values | | New data authorities . . . . . . > *RWX *SAME, *NONE, *RWX, *RX... | | New object authorities . . . . . > *OBJALTER *SAME, *NONE, *ALL... | | + for more values | | Authorization list . . . . . . . Name, *NONE | | | | | | | | | | | | | | | | | | Bottom | | F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display | | F24=More keys | | | +--------------------------------------------------------------------------------+For NetWare 3.12, the NetWare bindery is searched to locate the user or the group to set the authority to the object. For NetWare 4.10, the user or group must exist in the NetWare NDS tree. To locate the user or group, the NDS context of the user you are authorizing is searched first. If it is not found, the context of the job is searched next and then the context of the AS/400 system.
![]()
|
If the context is correct, you can verify that the user exists by using the WRKLNK command to display the NDS path to the user or group. Inherited Rights Filter and Effective Rights You can set the NetWare inherited rights filter from the AS/400 by using the *NTWIRF special value on the CHGAUT command. To display your effective rights, use the DSPAUT command. Your effective rights are shown under special value, *NTWEFF. +--------------------------------------------------------------------------------+ | Work with Authority | | | | Object . . . . . . . . . . . . : /QNetWare/ntwserv.svr/vol1/lotus | | Owner . . . . . . . . . . . . : KYLE | | Primary group . . . . . . . . : *NONE | | Authorization list . . . . . . : *NONE | | | | | | Type options, press Enter. | | 1=Add user 2=Change user authority 4=Remove user | | | | Data --Object Authorities-- | | Opt User Authority Exist Mgt Alter Ref | | _ __________ ________ | | _ *NTWIRF *RWX X X X | | _ *NTWEFF *RWX X X X | | _ MERRY *R X X X | | | | Bottom | | Parameters or command | | ===> | | F3=Exit F4=Prompt F5=Refresh F9=Retrieve | | F11=Display detail data authorities F12=Cancel F24=More keys | | (C) COPYRIGHT IBM CORP. 1980, 1996. | | | +--------------------------------------------------------------------------------+Integrated File System Commands All of the operations that you can do through the integrated file system menus and displays can also be done by entering control language (CL) commands. These commands can operate on files and other objects in any file system that is accessible through the integrated file system. Table 19-5. Integrated File System Commands
|
In addition to the previous commands, the following commands cannot
be used against NDS objects, servers, or volumes:
|
For more details about the integrated file system commands, see Integrated
File System Introduction.
Copying Objects Three commands are available for copying objects to and from the QNetWare file system. You also can use the graphical interfaces of the Client Access Optimized clients and the Client Access for Windows 3.1 client to copy Integrated File System objects.
You can use this command to copy QNetWare file system objects into other file systems that support stream files (for example, "root", QOpenSys or QDLS). It is possible to copy objects within QNetWare file system; that is, from one server to another. You can copy an AS/400 database file to QNetWare file system using this command; but no conversion is done. The resulting stream file in the QNetWare file system may not be useful. When copying files between other file systems and QNetWare, the authorizations are also copied, if possible. Because a trustee assignment on a file or directory overrides any inherited rights, the result might be more or less authority than desired. After you perform a CPY or MOV, check the resulting authority by using the DSPAUT command, as shown in "Inherited Rights Filter and Effective Rights". Copying an AS/400 file to the QNetWare file system--Example You can copy a physical file or a source physical file from AS/400 to the QNetWare file system using the CPY command.
![]() CPY OBJ('/QSYS.LIB/LIBRARY1.LIB/FILE1.FILE/MEMBER1.MBR') TOOBJ('/QNETWARE/SERVER1.SVR/SYS/DTA/MEMBER1.DAT') TOCODEPAGE(437) DTAFMT(*TEXT)where TOCODEPAGE must be an ASCII code page, because you are going from EBCDIC to ASCII on the NetWare server. 437 is an example of one ASCII code page. Copying an AS/400 Database File to QNetWare File System--Example Suppose you want to make an AS/400 database file available to all NetWare users. If the database file is externally defined (using DDS) you cannot copy it directly to a file in QNetWare file system. You need to first copy it to a physical file and then you can copy it to a file in QNetWare. If your file has packed decimal fields, you first need to create a logical file to convert the packed decimal fields. The following example shows how to convert the packed decimal fields in your file. The file in this example is in library DATALIB and has the name CUSTCDT. See Figure 19-2 for the DDS description of the file CUSTCDT. The fields CUSNUM, ZIPCOD, CDTLMT, CHGCOD, BALDUE, and CDTDUE are of type "packed decimal". All other fields are of type "character". Figure 19-2. DDS for AS/400 Database File CUSTCDT +--------------------------------------------------------------------------------+ |A R CUSREC | |A CUSNUM 6P 0 COLHDG('Customer number') | |A LSTNAM 8A COLHDG('Last name') | |A INIT 3A COLHDG('First/middle initial') | |A STREET 13A COLHDG('Street address') | |A CITY 6A COLHDG('City') | |A STATE 2A COLHDG('State abbreviation') | |A ZIPCOD 5P 0 COLHDG('Zip code') | |A CDTLMT 4P 0 COLHDG('Credit limit') | |A CHGCOD 1P 0 COLHDG('Charge code') | |A BALDUE 6P 2 COLHDG('Balance due') | |A CDTDUE 6P 2 COLHDG('Credit due') | +--------------------------------------------------------------------------------+If you are not familiar with DDS definitions see Figure 19-4 for the output of the DSPFFD CUSTCDT command. See Figure 19-5 for the content of the CUSTCDT file which was created using an AS/400 query. Because the CUSTCDT database file contains packed decimal fields you cannot copy it directly into the QNetWare file system. You have to convert the packed decimal fields to zoned decimal fields. You can do this by creating a logical file over CUSTCDT where you change the field definition for all fields of type "packed decimal" to type "zoned decimal". See Figure 19-3 for the DDS definitions of such a logical file. The name of this logical file is CUSTCDTL. There is no need to specify other field definitions. The logical file is built over the physical file and copies all the field definitions from it. You only need to specify "S" for the data type of all fields of type packed decimal to redefine it as type zoned decimal. Optionally you can select a subset of fields you want to copy to QNetWare. Just put the fields you need into the logical file. You could also specify an ordering sequence on the logical file. For more information about DDS, see the DDS Reference book. Figure 19-3. DDS for Logical File CUSTCDTL +--------------------------------------------------------------------------------+ |A R CUSREC PFILE(CUSTCDT) | |A CUSNUM S | |A LSTNAM | |A INIT | |A STREET | |A CITY | |A STATE | |A ZIPCOD S | |A CDTLMT S | |A CHGCOD S | |A BALDUE S | |A CDTDUE S | +--------------------------------------------------------------------------------+Figure 19-4. DSPFFD of AS/400 Database File CUSTCDT
|
![]()
|
CRTLF FILE(DATALIB/CUSTCDTL) SRCFILE(DATALIB/QDDSSRC)
![]() DSPFD FILE(CUSTCDTL) TYPE(*RCDFMT)See Figure 19-6 for the result. Figure 19-6. Result of the Command DSPFD CUSTCDTL *RCDFMT +--------------------------------------------------------------------------------+ | Record Format Level | | Format Fields Length Identifier | | CUSREC 11 60 3B84438D4C428 | | Text . . . . . . . . . . . . . . . . . . . : | | Total number of formats . . . . . . . . . . : 1 | | Total number of fields . . . . . . . . . . . : 11 | | Total record length . . . . . . . . . . . . : 60 | +--------------------------------------------------------------------------------+
CRTPF DATALIB/CUSTSTMF RCDLEN(60)
CPYF FROMFILE(CUSTCDTL) TOFILE(CUSTSTMF) MBROPT(*ADD) FMTOPT(*NOCHK)
![]() Figure 19-7. CPYTOSTMF Command +-----------------------------------------------------------------------------------+ | Copy To Stream File (CPYTOSTMF) | | | | Type choices, press Enter. | | | | From database file member . . (1) > '/QSYS.LIB/DATALIB.LIB/CUSTSTMF.FILE | |/CUSTSTMF.MBR' | | To stream file . . . . . . . . (2) > '/QNetWare/SRVNW0A.SVR/SYS/DTA/CUSTCDT.DAT' | | | | Copy options . . . . . . . . . . *NONE *NONE, *ADD, *REPLACE | | Data conversion options . . . (3) *AUTO *AUTO, *TBL, *NONE | | Database file CCSID . . . . . (4) > 37 1-65533, *FILE | | Stream file codepage . . . . . (5) > 850 1-32767, *STMF | | End of line characters . . . . . *CRLF *CRLF, *LF, *CR, *LFCR... | | | | | | | | | | | | | | | | Bottom | | F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display | | F24=More keys | | | +-----------------------------------------------------------------------------------+
Specify the path name of the CUSTSTMF program-described database file. ![]()
Specify the path name of the stream file. /QNetWare/SRVNW0A/SVR/SYS/DTA/CUSTCDT.DATIn this case you would use the drive letter as a link to CUSTCDT.DAT.
The default of *AUTO converts the data during the copy operation using the coded character set identifier (CCSID) equivalentof the stream file data code page and the database file CCSID. To use your own translation table object specify *TBL and enter the table name into the TBL parameter.
If your database file has a CCSID of 65535, you must enter a valid CCSID code for your data to be correctly converted to ASCII. The values 0, 65534, and 65535 are not valid to use with this command.
Specify the ASCII code page of the NetWare server to convert the data. To obtain the code page of server SRVNW0A, enter: DSPMFSINF OBJ('/QNetWare/SRVNW0A.SVR/SYS/DTA')This example converts the database file data from CCSID 37 to ASCII code page 850. Transferring Files to QNetWare You can use the File Transfer Protocol (FTP) support to transfer files to and from any of the following file systems:
Migrating Data You can use AS/400 commands and shared folders support to move data:
You can move data from one NetWare server to another or rearrange data within an Integrated PC Server by using the integrated file system commands, Copy (CPY) and Move (MOV). Mount the volumes with the files you want to move as well as the target Integrated PC Server. Then use the CPY command to move the files from one location to another. It is recommended that you use the CPY command rather than the MOV command to ensure your ability to retrieve the data, if needed. To ensure that authorities are preserved, the user migrating data should be a NetWare administrator with Supervisor (*OBJREF) authority. Each file system has its own unique characteristics. You may want to move objects from one file system to another to take advantage of those characteristics. However, moving objects to a different file system may mean losing the advantages of the file system that the objects are currently stored in. Before moving objects to another file system, you should consider the following:
Migrating objects to another file system involves the following:
![]() Migrating Data Using Shared Folders Support If you have a PC with both the NetWare Requester and Client Access (the
premier Client Access clients) installed, you can move data from one Integrated
PC Server to another or rearrange data within the Integrated PC Server
by using shared folders support. You can use the PC command (COPY) or other
client interfaces to copy information in files on the client to a directory
in the Integrated File System. You can also transfer data using the transfer
request support provided by Client Access. For more information about PC
commands and shared folder support, see the Client Access/400 for DOS
with Extended Memory User Guide or the Client Access/400 for OS/2
User Guide.
Installing DOS Applications You can install DOS applications in the QNetWare file system either from CA/400 or the NetWare requester. Installing Applications from CA/400 To install DOS applications from CA/400:
|
Refer to the Client Access documentation for instructions on mapping
a drive and using CA/400.
Installing Applications from NetWare Requester Refer to Integration Services for the Integrated PC Server for
information about installing applications on the Integrated PC Server.
Refer to the NetWare documentation for information about using NetWare
Requester to install DOS applications.
Saving and Restoring Files through QNetWare You can save and restore NetWare volumes, files, directories, storage spaces, and NetWare 3.12 binderies accessed through the QNetWare file system. You can use one of the following methods when saving and restoring NetWare data:
NetWaredata is stored in the QFPNWSSTG directory in QNetWare In this directory, each logical PC drive appears as one large object to AS/400Therefore, you can save entire virtual drives by saving this directory, but you cannot restore individual files or directories from saved copies of directories within the QFPNWSSTG directory. To save the QFPNWSSTG directory, vary off the NWSD (network server description) and use option 21 or option 23 on the Save menu. The time that it takes to save the QFPNWSSTG directory is significantly less than the time it takes to save the QNetWare directory.
Incremental saves The QNetWare directory reflects the hierarchical directory structure of your PC. Therefore, you can save and restore individual volumes, directories, and files from this directory. You can also save resources in SAV.RST; however, they cannot be selectively restored. Instead, the resources are saved and restored as a single block of data. The NWSD (network server description) must be varied on to save objects accessed through QNetWare. *ALLOBJ special authority gives enough authority to save NetWare objects and their authority information only when:
![]() Accessing the QNetWare File System from AS/400 or Client Access/400 You can access the QNetWare file system either from the integrated file system interface on the AS/400 or the Client Access/400 interface. Using the OS/400 Integrated File System Interface If you want to display or access all the NetWare volumes in your network, you can use the WRKLNK or DSPLNK command and use the OS/400 menus. You can also use this method to determine the entire path name for the MOUNT command.
![]()
![]() +--------------------------------------------------------------------------------+ | Work with Object Links | | | |Directory . . . . : / | | | |Type options, press Enter. | | 3=Copy 4=Remove 5=Next level 7=Rename 8=Display attributes | | 11=Change current directory ... | | | |Opt Object link Type Attribute Text | |5 QNetWare DIR | | QOpenSys DIR | | QOPT DIR | | QPWXCGA DIR | | QPWXCGY DIR | | QPWXCPC DIR | | QPWXCRB DIR | | QPWXCRBD DIR | | QPWXCSO DIR | | More... | |Parameters or command | |===> | |F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel F17=Position to | |F22=Display entire field F23=More options | | | +--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+ | Work with Object Links | | | |Directory . . . . : /QNetWare | | | |Type options, press Enter. | | 3=Copy 4=Remove 5=Next level 7=Rename 8=Display attributes | | 11=Change current directory ... | | | |Opt Object link Type Attribute Text | | A960502A.SVR DDIR | | CT_TREE.TRE DDIR | |5 NTWSERV.SVR DDIR | | IBM_TREE1.TRE DDIR | | ITSOM02_TREE.TRE DDIR | | LONG_TREE_NAME_THA > DDIR | | LONGPATH_WITH_ENOU > DDIR | | MENG536.SVR DDIR | | NETSRV.SVR DDIR | | More... | |Parameters or command | |===> | |F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel F17=Position to | |F22=Display entire field F23=More options | | | +--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+ | Work with Object Links | | | |Directory . . . . : /QNetWare/NTWSERV.SRV | | | |Type options, press Enter. | | 3=Copy 4=Remove 5=Next level 7=Rename 8=Display attributes | | 11=Change current directory ... | | | |Opt Object link Type Attribute Text | | AS4NW DDIR | |5 DOC DDIR | | DOCVIEW DDIR | | ETC DDIR | | FSNWMON.LOG DSTMF | | LOGIN DDIR | | MAIL DDIR | | PUBLIC DDIR | | SYSTEM DDIR | | More... | |Parameters or command | |===> | |F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel F17=Position to | |F22=Display entire field F23=More options | | | +--------------------------------------------------------------------------------+ You can also display or access all the NetWare volumes in your network from an AS/400 client.
Figure 19-11. Accessing the QNetWare Directory from Client Access/400
Writing Integrated File System Applications In addition to the Integrated File System commands and menus, OS/400 provides APIs that enable ILE C/400 programs to perform functions on files and directories in all file systems. Be aware that there are some considerations using Integrated File System APIs on the QNetWare file system compared to the other file systems. To write ILE C/400 programs to use the QNetWare file system see the System API Reference for a detailed description of each API. See ILE Concepts, ILE C/400 Programmer's Guide, and ILE C/400 Programmer's Reference for more information about ILE and ILE C/400. The Integrated File System APIs are very useful for integrating the AS/400 database with Enhanced Integration for NetWare data. "Copying an AS/400 Database File to QNetWare File System--Example" contains an example of using the CPYTOSTMF command to copy an AS/400 database file to the QNetWare file system for Enhanced Integration for NetWare users. See "ILE C/400 Program to Copy an AS/400 Database File to QNetWare File System--Example" for an ILE C/400 program example that performs a similar function.
![]()
|
In addition to the previous APIs, you cannot use the following APIs
against NDS objects, servers, or volumes:
|
For more details about the integrated file system APIs, please see
System API Reference
ILE C/400 Program to Copy an AS/400 Database File to QNetWare File System--Example Suppose you have a customer file that you want to make available to all NetWare users. See Figure 19-2 for the DDS description of our example database file CUSTCDT in library DATALIB. The contents of CUSTCDT are shown in Figure 19-5 using an AS/400 query. The ILE C/400 program NWCUST uses the external description of CUSTCDT. To convert the data from EBCDIC to ASCII, it uses the system APIs from the service program QTQICONV. This service program provides APIs to convert a buffer of characters from one coded character set identifier (CCSID) into another CCSID. To create the stream file CUST.DAT, it uses the open(), write() and close() Integrated File System APIs. Figure 19-12. ILE C/400 Program Using Integrated File System APIs--Example
* * * * * S O U R C E * * * * *
Create the ILE C/400 module and bind it to the QTQICONV service program to create the NWCUST program. Use the following commands: CRTCMOD MODULE(NWCUST) SRCFILE(QCSRC) OUTPUT(*PRINT) OPTION(*SHOWUSR) CRTPGM PGM(NWCUST) BNDSRVPGM(QTQICONV) See Figure 19-12 for the source listing of NWCUST created by the CRTCMOD command.
This function opens the stream file for write only (O_WRONLY flag). If the file does not exist it is created (O_CREAT flag). If it exists it is truncated to 0 bytes length (O_TRUNC flag). This ensures that the stream file is replaced every time the program runs. S_IRWXU sets file authority bits. S_IRWU is used to let you read and write to the file. Refer to "NetWare File Mode Support" for more information.
The sprintf() function converts all packed decimal data fields from the database file into characters and formats them correctly with the format-string for example,, "D(6.2)". Function iconv() converts the stream file buffer to ASCII code page 850. ![]() DSPMFSINF OBJ('/QNetWare/NTWSERV1.SVR/SYS/SYSTEM') ![]()
![]() See Figure 19-13 for the contents of the stream file CUST.DAT after the NWCUST program has run and created it. Figure 19-13. Content of CUST.DAT from a DOS or OS/2 TYPE Command +--------------------------------------------------------------------------------+ |[C:\]type \\J:cust.dat | |938472,Henning ,G K,4859 Elm Ave ,Dallas,TX,75217,5000,3,37.00,0.00 | |839283,Jones ,B D,21B NW 135 St,Clay ,NY,13041,400,1,100.00,0.00 | |392859,Vine ,S S,PO Box 79 ,Broton,VT,5046,700,1,439.00,0.00 | |938485,Johnson ,J A,3 Alpine Way ,Helen ,GA,30545,9999,2,3987.50,33.50 | |397267,Tyron ,W E,13 Myrtle Dr ,Hector,NY,14841,1000,1,0.00,0.00 | |389572,Stevens ,K L,208 Snow Pass,Denver,CO,80226,400,1,58.75,1.50 | |846283,Alison ,J S,787 Lake Dr ,Isle ,MN,56342,5000,3,10.00,0.00 | |475938,Doe ,J W,59 Archer Rd ,Sutter,CA,95685,700,2,250.00,100.00 | |693829,Thomas ,A N,3 Dove Circle,Casper,WY,82609,9999,2,0.00,0.00 | |593029,Williams,E D,485 SE 2 Ave ,Dallas,TX,75218,200,1,25.00,0.00 | |192837,Lee ,F L,5963 Oak St ,Hector,NY,14841,700,2,489.50,0.50 | |583990,Abraham ,M T,392 Mill St ,Isle ,MN,56342,9999,3,500.00,0.00 | | | |[C:\] | +--------------------------------------------------------------------------------+ In this example, the J: drive was mapped to SERVER:VOLUME\DATA using the NetWare client. Because the fields in CUST.DAT are separated by a comma, it is very
easy to incorporate the file into a spreadsheet application.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ] |