21
Sat, Dec
3 New Articles

QNTC: Opening Windows NT to the AS/400

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Microsoft Windows NT has become the network software of choice in recent years, and if you don’t think IBM recognizes this fact, then you’ve never heard of the QNTC file system on the AS/400. As part of the AS/400 Integrated File System (AS/400 IFS), which includes QDLS and QLANsrv among others, QNTC can act as a repository or conduit for files on your NT PC server.

This article takes a look at what QNTC is, why you might want to use it, and how to configure it and gives you a quick look at one of the more interesting features coming up in Version 4, Release 5 of OS/400.

A Bit of History

The AS/400 has supported an internal PC card for a long time. Originally known as the File Server I/O Processor (FSIOP), its name was later changed to Integrated PC Server (IPCS), and it is currently known as the Integrated Netfinity Server for AS/400. No matter what it is called, its main function has remained the same: to allow AS/400 customers to load PC software, such as Novell NetWare, onto the card and run it from the AS/400 platform. Although NetWare users were the original target audience, IBM quickly expanded support for Lotus Domino and, most recently, Windows NT.

Version 4, Release 2 of OS/400 saw the first support of Windows NT on the IPCS. In that release, however, V4R2 users could load the NT Workstation software onto the IPCS and let the AS/400 act only as a node of the NT network. The AS/400 could not act as the NT server in a network. What’s more, the NT file system itself was not supported. In other words, native AS/400 applications, APIs, and commands were unable to access files on an NT server in the network, which left a rather incomplete system. This must have made for a tough sale for IBM sales reps who had to try to convince NT shops that the expensive AS/400 platform was a good value over their cheaper PC servers. When asked if they could integrate their NT data with their DB2/400 data, the IBM marketing rep probably hemmed and hawed and finally sheepishly admitted that this functionality didn’t exist yet. No sale!

Version 4, Release 3 of OS/400 changed all that. This release of the operating system introduced the QNTC file system to the AS/400 community. At last, there was a way to let your RPG IV programs directly access data on your NT network. What’s more, now, your AS/400, with Windows NT loaded onto the IPCS (hereafter referred to as the

Integrated Netfinity Server), could act as the NT server in your NT network if you so desired. If you didn’t want the AS/400 to be the server, it could also act as a node on the NT network. NT files on the AS/400 server became available to the rest of the AS/400 through the QNTC file system.

How It Works

You communicate with the QNTC file system using the POSIX APIs, such as OPEN(), READ(), and WRITE(). These are the same APIs that you use to manipulate any other file in the AS/400 IFS. As shown in Figure 1, the RPG IV program reads from a file in the QNTC file system and then writes that data to a DB2/400 database. Notice the path statement in the variable Filepath. You can see that I specified the QNTC file system as part of the path name. In this example, the program will open a file named HPSETLOG. TXT in the QNTC file system on the server named NOAHSARC. You can change the value of this variable if you’d like to try out this code. Either hardcode the file path name in that variable or build a dynamic variable at runtime. For a detailed explanation of what’s going on in this program, check out the article “RPG IV and the IFS,” by Ted Holt in the December 1997 issue of Midrange Computing.

You can also use the Work with Object Links (WRKLNK) command to access the files in QNTC. Once you either issue a command line command or call one of the POSIX APIs, that command string is translated into something NT can understand using the Common Internet File System (CIFS). CIFS is a new industry standard developed by Microsoft to define remote file access protocol. QNTC takes all the work out of converting your commands to something NT understands by converting those commands into CIFS building blocks, which are also known as server message blocks (SMBs).

Incidentally, SMBs are what AS/400 NetServer uses to communicate with your Windows systems to perform file and print sharing.

Once the command has been translated to an SMB, it is sent to the NT system over your IP network as a NetBIOS packet, which is encapsulated in the TCP/IP packet. By encapsulating these SMBs in NetBIOS over TCP/IP, the data can be transmitted over network bridges and routers. A much wider range of network servers can be accessed this way than by using NetBIOS alone.

Why Use It?

There are myriad reasons why you should start to use this new file system. Perhaps the simplest one is that your users will need to log onto only one system to access all their data. The QNTC file system handles the connection handshake between OS/400 and the NT server, whether that server is loaded locally on the Integrated Netfinity Server or on a remote network two or three TCP/IP hops away. When users log onto the AS/400, they are automatically logged onto the NT file system, too.

Let’s take a few moments to imagine a scenario using the AS/400 and the QNTC file system and go through one way you might use it. Let’s say that a departmental secretary comes into work in the morning and logs onto the AS/400 from her PC, using an emulation product such as Client Access/400. Although she’s not aware of it, when she logged onto the AS/400, she also logged onto the NT server because her AS/400 user ID and password were the same as the NT user ID and password set up for her on the NT server.

The secretary begins her daily task of updating item prices, using an RPG IV green- screen application. At some point, the secretary discovers that there are items in the OS/400 database without current pricing. She knows that another department handles pricing, so she phones someone in that department and learns that, yes, the new prices have been set, but they are stored on a PC in that department in a Microsoft Access database. At the secretary’s request, the Access database is saved and exported as a comma-delimited text file to the NT server.

In the good old days before QNTC, the secretary would have had to call the IS department and request that someone retrieve the Access data, convert it, and upload it to the AS/400. Either that, or someone would have had to print the data on hard copy and the secretary would have entered it manually. Today, there’s a better way, using the QNTC file system.

Returning to our scenario, when the secretary gets off the phone, she exits the item lookup screen and goes into a new green-screen application. In this one, she selects a list of item numbers she wants to update and presses a function key that prompts her with a list of predefined, available locations (paths) for the location of the pricing file. The secretary selects from the list the location of the exported Access database that resides on the NT server. When the secretary presses the Enter key to accept her choice, the RPG IV program, much like the one shown in Figure 1, which also uses the work file shown in Figure 2, uses the POSIX APIs OPEN and READ to open the exported text file and read the data from that file.

The new item prices from the text file are written to a temporary file in library QTEMP. Now, the RPG IV program does a simple chain to the temp file to extract the item prices that match those in the list chosen by the secretary and updates the items with the new prices. In seconds, the items all contain updated prices, and the secretary is back at work, verifying other item numbers.

This is just one of the thousands of possible scenarios for using the QNTC file system.

Configuring QNTC

Although you don’t have to purchase QNTC separately (it comes free as part of OS/400), there are a few steps you’ll need to take to configure it so you can start using it. All QNTC configuration steps take place from the Client Access/400 Operations Navigator on a PC connected to your AS/400.

On the AS/400

First, you’ll need to configure NetServer. That’s a topic that would take more space to cover than we have room for here. For a detailed description of configuring NetServer on your AS/400, check out “Client Access without Client Access” in the July/August 1998 issue of Client Access/400 Expert (now known as AS/400 Network Expert) from Midrange Computing. Another great article on AS/400 NetServer and how to configure it is
“NetServer Satisfies Express Client File Sharing Needs” in the April 1999 issue of MC. Both articles tell you what NetServer is and guide you step by step through configuring it. The one important NetServer configuration step I want to highlight here is that the domain name in your NetServer configuration must be the same as the Windows NT Server domain name. This is because QNTC uses the NetServer name resolution and browsing services to determine which servers are available on the network.

In the example shown in Figure 3, I configured NetServer properties using Operations Navigator to point to a server named Qcondor, which is the name of the AS/400 I was using, and the domain name of SieCorp. SieCorp is the workgroup name specified on the Identification panel on the PC’s Network properties panel. It’s also the NT domain name in this particular network. You can access the Network properties panel by right- clicking on the Network Neighborhood icon on your PC’s desktop and selecting Properties from the drop-down menu.

Once you’ve configured NetServer, make sure the QSERVER subsystem is started using the STRSBS SBSD(QSERVER) command and then start NetServer from Operations Navigator. One final note on the AS/400 configuration: Make sure that the AS/400 user ID and password you’re going to use match the Windows NT user ID and password.

On Windows NT

If you’re not familiar with Windows NT, you may need to refer to any of the numerous manuals on using Windows NT or even the Windows NT User Guide that comes with the software if you have specific questions about any of the steps listed below. Some of these steps will apply only if you are installing Windows NT for the first time:

• Match the NT user ID and password with the AS/400 user ID and password so that when a user logs on to the AS/400, that user will be automatically logged on to the NT server.

• Install the TCP/IP networking protocol when you install the NT server, either on the Integrated Netfinity Server or on a stand-alone PC. Installing the NetBIOS protocol is not necessary; NT can detect NetBIOS packets inside TCP/IP packets.

• Create the file directories (or shares, to use the Windows NT terminology) that your files will be stored in if you haven’t already done so. This step can be performed on an as-needed basis. The main thing to understand about shares is that when your native AS/400 application accesses a file in an NT share, it will refer to the file in the format/file system/server/directory/file name.

In the example shown in Figure 3, I use the WRKLNK command from an AS/400 command line to display a list of files and subdirectories. In this example, you see a file named hpsetlog.txt in the WINNT subdirectory under the C directory on the NOAHS-ARC server in the QNTC file system. Remember, the server named NOAHSARC may be on another PC in the network or on the Integrated Netfinity Server inside the AS/400. You identify which server to use by specifying its name in the path.

• Set up at least one server to be the domain controller for your NT network. The domain controller authenticates login requests in your network. If you have an Integrated Netfinity Server on your AS/400 and you load Windows NT Server onto it, you could set up that server as the domain controller.

• Configure at least one NT PC, either the one on the Integrated Netfinity Server (if you’re using it) or one somewhere on the network, to be the master browser. NT uses browsing to allow other systems to determine the computer member list for a given domain.

That’s pretty much it. There are a few other things you can do if you so desire. For example, you could configure one of the NT PCs as a WINS Proxy server. This step isn’t necessary if the AS/400 and the NT server both reside on the same subnet. Don’t forget to start the NT browsing service! When I configured NetServer and the QNTC file system on a friend’s AS/400 and NT network at his software development company, SieCorp (www.siecorp.net), here in central Illinois, I was completely hooked up and accessing a file on his NT server from the AS/400 in under 10 minutes. Now, that’s fast!

Make Sure It Works

To check out your configuration, from an AS/400 command line, enter the WRKLNK command and press Enter. Search for the QNTC file system in the resulting list and enter a 5 next to it to display the next level. You should see the NT server(s) on which your AS/400 shares a domain. Enter a 5 next to each one to drill down through the available shares directories. You should see a display much like that shown in Figure 4.

What’s Ahead

The most exciting new feature that Version 4, Release 5 of OS/400 will introduce is the use of the familiar AS/400 Save and Restore commands to save and restore data from the QNTC file system using your AS/400 storage devices. The only caveat here is that you can back up and restore only data that is stored on the Integrated Netfinity Server. This isn’t necessarily a bad thing, though; you can store a lot of NT data on the AS/400! What’s more, the Integrated Netfinity Server will be upgraded to a 500+ MHz chip in early 2000, so the processing speed of Windows NT residing on an AS/400 will be comparable, or even superior, to many standalone servers currently on the market. Future releases of

OS/400 will most likely allow any NT PC on the network to be accessed using the Save and Restore commands, but that’s still a ways down the road.

Bringing It All Together

IBM has been trying to sell the AS/400 as a viable platform for networking for a long time now without much luck. Trying to convince an NT shop that it would be better off purchasing this $75,000 machine instead of that $6,000 standalone PC hasn’t been an easy road to travel. Now, finally, IBM may be on to something. The functionality that QNTC brings to an NT network is exactly the kind of thing these NT shops need. It’s also the hook that IBM can use to replace all those standalone systems with dedicated AS/400 network servers.

REFERENCES AND RELATED MATERIALS

• AS/400—Implementing Windows NT on the Integrated Netfinity Server, Redbook (SG24-2164-01)

• “Client Access without Client Access,” Bridget Meyer, Client Access/400 Expert (now known as AS/400 Network Expert), July/August 1998
• “NetServer Satisfies Express Client File Sharing Needs,” Bridget Meyer, MC, April 1999
• OS/400 UNIX-Type APIs V4R4 (SC41-5875-03, CD-ROM QB3AM403)
• “RPG IV and the IFS,” Ted Holt, MC, December 1997
• Support for Windows Network Neighborhood (AS/400 NetServer) home page: www.as400. ibm.com/beyondtech/netserver.htm

*================================================================

* To Compile:

*

* CRTBNDRPG PGM(XXX/QNTC00R1) DFTACTGRP(*NO) BNDDIR(QC2LE)

*================================================================

*

FRcfile O E K Disk

*

* open -- open a QNTC file

D open pr 10i 0 ExtProc('open')

D Filepath * value

D openflags 10i 0 value

D mode 10u 0 value options(*nopass)

D codepage 10u 0 value options(*nopass)

* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

* read -- read a QNTC file

*

D read pr 10i 0 ExtProc('read')

D filehandle 10i 0 value

D datareceived * value

D nbytes 10u 0 value

* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

* write -- write to a QNTC file

*

D write pr 10i 0 ExtProc('write')

D filehandle 10i 0 value

D datatowrite * value

D nbytes 10u 0 value

* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

* close-- close a QNTC file

*

D close pr 10i 0 ExtProc('close')

D filehandle 10i 0 value

* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

* values for oflag parameter, used by open()

* from QSYSINC/H, member FCNTL

D O_Rdonly s 10i 0 inz(1)

D O_Textdata s 10i 0 inz(16777216)

* Prototype for reading from the QNTC file

D RdntFil PR 100A

D Filepath 100A CONST

D CodePage S 10u 0 inz(819)

D Cr C const(x'0D')

D Data_Rec S 78A

D Eol C Const(x'0D25')

D Error_Flag S 1A INZ('0')

D File S 100A

D Filepath S 100A INZ('/QNTC/NOAHSARC/C/+

D WINNT/HPSETLOG.TXT')

D Fp S 10i 0

D I_Net_Adr S 20A Inz

D Lf C const(x'25')

D N S 5 0

D Oflag S 10i 0

D Omode S 10u 0

D R S 5 0

D Rc S 10i 0

** MAIN

*C Eval Error_Flag = RdNtFil(Filepath)

C Eval *Inlr = *On

** RdNtFil - Subprocedure To Read a file from QNTC File System

*P RdNtFil B Export

D RdNtFil PI 100A

D Filepath 100A Const

D CharsRead S 10i 0

D CurChar S 1

D Eof C const(x'00')

C Eval Oflag = O_Rdonly + O_Textdata

C Eval File = %trim(Filepath) + x'00'

C Eval Fp = open(%addr(File): Oflag)

C If Fp < 0

C Eval Error_Flag = *On

C Return Error_Flag

C Endif

C Eval R = 0

C Eval N = 0

C Eval Data_Rec = *Blanks

C Exsr GetChar

C Dow CurChar <> Eof

C Select

C When R = 78

C Exsr Write_Rec

C Eval R = *zero

C Eval Text = *blanks

C When CurChar = Cr

C Exsr Write_Rec

C Eval R = *zero

C Eval Text = *blanks

C When CurChar = Lf

C Exsr Write_Rec

C Eval R = *zero

C Eval Text = *blanks

C Other

C Eval R = R + 1

C Eval %Subst(Text: R: 1) = CurChar

C Endsl

C Exsr GetChar

C Enddo

C Exsr Write_Rec

* Close the QNTC File

C CallP Close(Fp)

C Return Error_Flag

** GetChar - Process QNTC Record, One Character At A Time

*C GetChar begsr

* If input buffer is empty, or all characters have been

* processed, refill the input buffer.

C If N = CharsRead

C Eval Data_Rec = *Blanks

C Eval CharsRead = Read(Fp: %Addr(Data_Rec): 78)

C Eval N = *Zero

C Endif

* Get the next character in the input buffer.

c If CharsRead <= 0

C Eval CurChar = Eof

C Else

C Eval N = N + 1

C Eval CurChar = %Subst(Data_Rec: N: 1)

C Endif

C Endsr

** Write_Rec - Write Data from QNTC file to database

*C Write_Rec Begsr

C Write Rcrec

C Endsr

P RdNtFil E

Figure 1: This RPG IV program demonstrates how to read from a file in the QNTC file system and then write that data to a DB2/400 file.

****************************************************** **

* TO COMPILE:

* CRTDSPF FILE(XXX/RCFILE) SRCFILE(XXX/QDDSSRC)

****************************************************** **

R RCREC

TEXT 80A COLHDG('TEXT')

Figure 2: The RPG IV program reads from a file in the QNTC file system and then writes that data to a DB2/400 database.

Figure 3: Configure NetServer to use your AS/400 system name and your network’s domain name.

Figure 4: Use the AS/400 WRKLNK command to display your QNTC directories and files.





QNTC-_Opening_Windows_NT_to_the_AS-_40007-00.png 597x456





QNTC-_Opening_Windows_NT_to_the_AS-_40007-01.png 597x314
BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: