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

Brief: SDLC is the most popular communications protocol on the AS/400. This article covers everything you'll need to know about creating an SDLC line description.

Late one Friday afternoon, Dan Lewis, our new junior programmer, brought a problem to me. "Kris," he said, "the systems analyst wants me to define an SDLC line to connect our AS/400 here to the AS/400 at our new branch office downtown. I haven't the vaguest idea where to start. Can you give me some advice?"

"Sure," I replied. "Sit down, let's talk."

Dan settled into a chair in front of my desk and opened his notebook. He looked at me expectantly.

In order to define an SDLC line, you need to run the Create Line SDLC (CRTLINSDLC) command. But CRTLINSDLC has many options, so the first thing you need to get straight is what type of SDLC communications you need.

Dan explained, "We'll use a leased line to contact the branch office, located about two miles from here. We need to upload data from our F50 AS/400 to their F35 AS/400 throughout the day. Primarily, we'll send sales information from our order-entry system, which the branch office will use to update a new sales- analysis package. We're going to use a 56Kbps Motorola/Codex DSU, and the analyst wants a full-duplex connection. She also asked if we could collect performance data about this new line so we can see how much it's being used."

With this information, you can come up with a plan. But first, you have to understand something about SDLC communications in general. Programming anything, especially data communications, without understanding the underlying concepts is like eating and not swallowing. You just don't get the full benefit from your efforts.

The first thing is to forget about the application-that's not important now. The analyst has given you the following communications prescription to be filled. One full-duplex, point-to-point, SDLC line running at 56Kbps connecting two points two miles apart using a DSU. DSU stands for a data service unit, which acts like a modem for connecting the AS/400 to a digital phone line.

IBM's AS/400 CL Reference manual will tell you which parameters of the CRTLINSDLC command you need to be concerned with. There are 63 different parameters to that command, so sorting them out is important.

Back to Basics

Let's review the background material first. The analyst specified a point-to- point leased line, which is essentially an uninterrupted phone call between two different locations. It's as if you made a call to someone and never hung up. The line is available 24 hours a day, seven days a week. Rather than being billed by the phone company on a call-by-call basis, you're charged a flat monthly rate for the line no matter how much it's used. Leased lines are usually more cost-effective than dial-up lines if the line is used more than three hours a day.

This type of line is also called a nonswitched line for two reasons. First, you don't place a call to make the connection between the two points you need to hook up. Secondly, the leased line is not a portion of the phone company's switched phone network. Think of it this way: if you dial a phone number to make a call, it's a switched connection. If you don't make a call, it's a nonswitched connection.

Call the phone company and request the leased line to connect your site to the branch office. This particular case requires a digital line because 56Kbps is generally considered too fast for an analog line. In addition to the digital leased line, you need to decide what type of interface you're going to use to connect the modems to the AS/400.

"Don't most modems use the RS-232 interface?" Dan asked. "My PC modem does."

The AS/400 uses the RS-232 interface to accommodate line speeds of up to 19.2Kbps. Faster line speeds, like those associated with digital lines, make it necessary to use the V.35 or X.21 interface, or the new RS-449 interface. In this case, the V.35 interface emerges as the favorite because it handles up to 64Kbps and can be used with digital phone lines.

On another front, the local AS/400 should control all communications with the branch office's AS/400. In addition, the digital line should be automatically varied on with each IPL of the AS/400. This reduces the risk of neglecting to vary the line on after monthly system cleanups or in case of a power failure.

To recap, you have a point-to-point, nonswitched, digital phone line running full-duplex communications at 56Kbps and utilizing the V.35 interface. The local AS/400 controls communications between machines. You also want to vary on the line automatically at IPL. With just a little more information, you'll be ready to map some CL parameters.

Every line needs a line description-a name, if you will. Why not assign a name that has some meaning, that helps describe the physicalities of the line? For instance, a name like RLPB11 tells you that you have a Remote, Leased, Point- to-point line connecting you to branch office 1 (B1). The final 1 indicates that this is the first line at this particular branch.

Putting It All Together

"Okay, I've got all that," Dan said. "What do I do next?"

Now you're ready to assemble the parameters you'll need from the CL manual and to take a peek at the reasons why you should select some of the OS/400- generated defaults.

The first parameter, LIND (line description name), is a required parameter. You've already established a significant name for the line: RLPB11. Remember that this name must match AS/400 naming conventions. You can change this parameter with the Rename Object (RNMOBJ) command or through option 7 of the Work with Line Descriptions display.

The next parameter, RSRCNAME (resource name), is also required. This parameter uses the unique name assigned by the AS/400 to the physical communication port attached to the system. The AS/400 uses the name to refer to internal information about a port. You actually attach the communications line to the AS/400 communications port that corresponds to this name.

The resource name is made up of two parts: the input/output adapter or IOA resource name, and the port number on that IOA. You can change the value of this parameter with the Change Line Description SDLC (CHGLINSDLC) command.

To obtain the system's name for this resource, use the Work with Hardware Resources (WRKHDWRSC) command, specifying a value of *CMN for the TYPE parameter. Suppose the WRKHDWRSC command shows a resource name of LIN012. The system produces this name by combining the IOA resource name (LIN01) with the number of the IOA port (2) you'll be using for this line.

The next parameter, ONLINE, determines whether the SDLC line should be online at IPL. The options are *YES and *NO. Choose *YES to indicate online at IPL. If more than one line description is created for a particular communications resource, try to ensure that only one line description uses the *YES value. If the AS/400 finds multiple line descriptions with *YES defined, it varies on the first description that it finds. (The search is conducted in alphabetical order).

"Can this parameter be changed?" Dan asked.

Any changes to the ONLINE parameter can be made with the CHGLIN-SDLC command.

Next is the ROLE parameter. Its values can be the default of *NEG for negotiate, *PRI for primary and *SEC for secondary. The ROLE parameter indicates whether the local AS/400 will dynamically negotiate with the system at the other end of the line to determine which system will be the controlling station and which will be the secondary or responding station. In the example situation, you've already reached that decision. You want your AS/400 to be the primary station, so you'll go with *PRI. *NEG is only valid for certain communication applications as documented in IBM's Communications Configuration Reference manual (SC41-0001, CD-ROM QBKA1802).

The INTERFACE parameter has several valid values, ranging from *RS232V24 to *RS449V36. *RS232V24 is the default. Each interface has specific line-type, speed and protocol limitations. You'll choose *X21, the interface used for medium-speed digital network environments. Bear in mind that you can't change this parameter once the line description is created. Instead, you must delete the line description and create it again.

Next, the CNN parameter designates the type of line connection used. The AS/400 supports nonswitched point-to-point, switched point-to-point, multipoint and X.21 short-haul mode line connections. Let this parameter default to *NONSWTPP for nonswitched point-to-point. In fact, when you use *V35, *X21BISV35 or *RS449V36 as the INTERFACE parameter, the default value and *MP for multipoint are the only permissible values. Like the INTERFACE parameter, CNN can't be changed with CHGLINSDLC.

"I'm a little nervous about this whole communications thing," Dan interjected.

Relax. Once you get the concepts down, communications is 85 percent terminology and 15 percent technology. There are many interesting parameters associated with AS/400 communications lines, but only a handful apply to the line the analyst described.

The next parameter that interests us is the EXCHID, or exchange ID. Essentially, the exchange ID is a name used to identify your AS/400 to a remote system.

The exchange ID is made up of two parts. The first part, which is three digits long, is called the block number. For AS/400s, the block number is 056. The S/36's block number is 03E and the S/38's is 022. The second part of the exchange ID, which is five bytes long, is the user-defined code, made up of a combination of numbers (0 through 9) and letters (A through F). The default for this parameter, *SYSGEN, causes the AS/400 to create the exchange ID for you. It takes the 056 AS/400 prefix and adds the five-digit suffix by using the last five digits of the AS/400's serial number. I suggest you take the default.

"Wow, that's cool," Dan said. "How can we find out what our AS/400 will assign as the exchange ID after the line description is created?"

You can use the Display Line Description (DSPLIND) command to obtain the system-supplied exchange ID, but you cannot change the value.

Next, you need the LINESPEED parameter. This parameter tells you the speed (in bits per second, or bps) at which data will be transmitted across the line. You can modify the LINESPEED parameter with the CHGLINSDLC command when the line is varied off. Possible values for this parameter, when used with SDLC lines, range from 600bps to over 2,000,000bps! The default is 9,600bps. You should use the value that corresponds with the rated speed of your modems (56,000 in this case).

LINESPEED enables you to collect some of the performance data the analyst requested. The AS/400's SDLC interface uses external clocking (clocking supplied by the modem). Therefore, the value of this parameter has no effect on the actual speed on the line. However, the value placed in this parameter is used for performance statistics, so try to make sure it's as close to the rated speed of your modems as possible.

"Now, we've only got a few parameters left," Dan said, following along in the manual. "We're almost home."

The next parameter to address is MODEM, a valuable but often misunderstood parameter. This parameter asks you what kind of modem diagnostic tests will be used online. You typically run these tests to validate that the modem is operating correctly or to diagnose a problem when an error occurs. Always check the owner's manual of the modem you intend to use to see which tests the modem supports. You can change the value of MODEM (when the line is varied off) with the CHGLINSDLC command. MODEM defaults to *NORMAL, which means no tests will be run. We'll stay with the default.

The next parameter of interest to you is called DUPLEX. It wants to know whether the modems will run at half- or full-duplex. The default is *HALF for SDLC lines, although I use *FULL on most SDLC lines because it's more efficient. *HALF would be a good choice for you, how-ever, if you were creating a multipoint line. Again, the DUPLEX parameter can be changed when the line is varied off by using CHGLINSDLC.

Dan scribbled some notes and then looked up. "Anything else?"

The 50-character TEXT parameter is the last parameter required in this setup. Always jot down a few words to describe what the line is used for and enter that information into this parameter. It helps remind you of things later on when you've forgotten all about setting up this line.

And that, believe it or not, is all there is! You now have all of the information you need to run your CRTLINSDLC command.

"Let me recap," Dan said. "If my notes are right, my CRTLINSDLC command will use the following parameters." He held up the sheet of paper on which he'd been writing the parameters and their associated values. I've reproduced it in 1.

"Let me recap," Dan said. "If my notes are right, my CRTLINSDLC command will use the following parameters." He held up the sheet of paper on which he'd been writing the parameters and their associated values. I've reproduced it in Figure 1.

The Branch Office

Remember that you'll actually need to create a second line description for the branch office's AS/400.

"Do I need to start all over to learn how to create their line description?" Dan lamented.

It's not as bad as all that. Five of the parameters discussed earlier need to be changed in order to create the branch office's line description. They are the line description (LIND); the resource name (RSRCNAME); the role (ROLE), which in this case will be *SEC for secondary station; the exchange ID (EXCHID); and the text (TEXT). Just follow the rules discussed earlier for the rest of these parameters and you'll be all set. Now that's really everything you need to get started!

"Thanks," Dan said. "I'm going to go run these commands right now!" With that he gathered up his notes, gave me a smile and fairly sprinted out of my office. "All in a day's work," I said.

Kris Neely is the connectivity editor for Midrange Computing.

REFERENCE AS/400 CL Reference Manual (SC41-0030, CD-ROM QBKA8202).


Figure 1 The CRTLINSDLC Command

 DESCRIPTION PARAMETER VALUE Line Description LIND RLPB11 Resource Name RSRCNAME LIN012 Role ROLE *PRI Interface INTERFACE *X21 Connect Type CNN *NONSWTPP (default) Exchange ID EXCHID *SYSGEN (default) Line Speed LINESPEED 56000 Modem Type MODEM *NORMAL (default) Duplex DUPLEX *FULL Text TEXT Leased line from Corporate to Branch office 1.