23
Sat, Nov
1 New Articles

The CRTLINSDLC Command

CL
Typography
  • 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).


The CRTLINSDLC Command

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. 
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: