26
Tue, Nov
1 New Articles

TOP TIPS: Operations September 1998

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

 

How to Convert Multiformat S/36 Files to Native

 

Use this conversion technique to convert multiformat S/36-files to native files:
1. Convert each format to one single physical external described file. The Midrange Computing Resource CD offers a utility (FI2DDS) to help accomplish the task. (See “Utility Converts AS/400 System/36-compatible F & I Specs to DDS,” MC, August
1989.)

2. Create a multiformat logical file, in which each physical file is a separate record type. Consider naming this file the same as the old S/36 file to reduce program modification.

3. Use the Copy File (CPYF) command to copy the S/36 data to the new physical files. Use the command’s Include by Character Test (INCCHAR) parameter to select the appropriate records for each physical file.

4. If you find decimal date errors in the new physical files, use the Fix Decimal Errors (FIXDECERR) utility to correct them. (See the Resource CD, “Stamp Out Decimal Data Errors,” MC, January 1992).

— Carsten Flensburg This email address is being protected from spambots. You need JavaScript enabled to view it.

Editor’s note: If you replace a S/36 disk file with a multiformat logical file, you may need a format selector program. See “Multiformat Files,” TechTalk, MC, February 1995 for more details.

 

Your AS/400’s Database Needs a Name

 

When you are first installing an AS/400, one of the first actions that you should perform is to add a Relational Database (RDB) directory entry. Without this entry, you will notice messages that contain a value of “*N” where there should be a database, system, or device name. Not having a RDB directory entry can also cause referential integrity errors, requiring you to perform a reclaim storage procedure. If you are an AS/400 systems

administrator, you already know that this can take a long time. I have also seen the omission of a RDB directory entry cause ODBC errors.

To work with your existing (if any) RDB directory entries, issue the Work with Relational Database Directory Entries (WRKRDBDIRE) command from an AS/400 command line. If your system does not have a directory entry, enter a 1 in the leftmost column and press the Enter key to add it. Specify “*LOCAL” for the remote location name.

— Chris Green ASTECH Solutions Inc.

 

Are You Sure Your SAVSYS Tape Will Load?

 

If you’ve installed a RISC system, you likely created a Save System (SAVSYS) tape of the new version of OS/400. Have you set the IPL mode to “D” (indicating the tape drive) and “Manual,” then actually tried to load from that tape drive? If you have not yet tried this “test,” you should schedule it right now! You don’t have to do anything with the system’s Licensed Internal Code (LIC) programs menu when it comes up; just see if the tape will load and display what is expected.

There are several reasons you may not be able to IPL from a tape drive on a RISC system. Conditions that may prevent an IPL from tape include out-of-date tape drive microcode, a SCSI address that must be 0 on 34xx and 35xx drives, and, on certain e- series models, the alternate installation device.

If your SAVSYS tape won’t load, find out why and fix it! — Dan Herron
This email address is being protected from spambots. You need JavaScript enabled to view it.

 

Don’t Lose Subsystem Modifications When Installing a New Release

 

Once upon a time, when OS/400 was very young (not higher than Version 2), the typical subsystem descriptions used by most installations were defined in library QGPL. During the teenage years (Version 3), IBM moved some of these objects to library QSYS. What a great idea this was, and is—except when user modifications to the subsystem description, particularly for tuning and work management, get wiped out. During a new release installation, all objects in QSYS get replaced. (I have seen people get bitten by this beast more than once!)

One thing you can do is copy the appropriate subsystem descriptions to another library, such as QGPL.

CRTDUPOBJ OBJ(sbsd_name) +

FROMLIB(QSYS) +

OBJTYPE(*SBSD) +

TOLIB(QGPL)

Then, change your startup program to start the subsystems from the copied descriptions:

STRSBS QGPL/sbsd_name

Now, installing new releases will not replace your tuned subsystem description. Consider subsystems with names that begin with Q (e.g., QCTL, QBATCH, QPGMR, and QINTER) as candidates for this protective change. You might have changed the pools, the routing entries, etc. on any or all of these subsystems.

This tip is, of course, true for any user objects in QSYS that you may have changed. I have observed changed commands, command options, tuned subsystem

descriptions, and queues of all kinds. Think about the idea, and fix it so you won’t be bothered by release installations causing operational problems.

— Dan Herron This email address is being protected from spambots. You need JavaScript enabled to view it.

Editor’s note: It is a good idea to rename the subsystem descriptions when you copy them. OS/400 does not require them to start with the letter Q. Giving them other names distinguishes them from the IBM-supplied objects.

If you do not rename IBM-supplied objects, you should put your versions in a library that precedes QSYS in the system library list, in case programs scan the library list for those objects.

 

Are You Using Passive Hubs?

 

The new e Series models of AS/400 have differences in the electrical circuits for twinax-connected devices. These differences become most apparent when you have a passive (i.e., nonpowered) hub and are using twisted-pair connections.

If you’re planning to upgrade to these new models and have passive hubs, you may have to replace them with active hubs.

— Dan Herron This email address is being protected from spambots. You need JavaScript enabled to view it.

 

Browsing Libraries with the Client Access/400 File Transfer

 

Q:When I use the Windows 95/NT Client Access/400 data transfer programs to browse available libraries on the AS/400, only the QGPL and QIWS libraries appear in the Browse Files and Members window. How can I access other libraries through file transfer?

A: By default, Client Access’ file transfer program uses the QUSRLIBL system value—which determines the user part of the library list—to determine what libraries to make available in the Browse Files and Members window. Your default user library list probably consists of the QGPL and QIWS libraries. To allow your users to perform file transfers from the libraries they want, you have the following options:

• Specify the explicit AS/400 library and file name you want to transfer to or from by typing that name in the data transfer file name field (as shown in Figure 1). The field must be in the format lib/file. In this example, we are transferring the HELP file from library QGPL.

• Use the Change System Value (CHGSYSVAL) command to change your user library list to include any library your user wants to perform a file transfer to or from. Be aware, however, that this is a global change that will modify the user library list for every AS/400 user on your system. Every user will now have access to these libraries.

• Change the individual user’s user library list by creating a unique job description that contains its own user library list and then assigning it to that individual’s user profile. First, create a unique job description with its own user library list by using the Create Job Description (CRTJOBD) command:

CRTJOBD JOBD(job-description-name) +

INLLIBL(QGPL SHARELIB)

Next, attach this job description to the user’s profile by using the Change User Profile (CHGUSRPRF) command:

CHGUSRPRF USRPRF(profile-name) +

JOBD(job-description-name)

Now, whenever the user signs on, the user library list in the job description will override the user library list specified in QUSRLIBL. The library list will be customized according to the individual’s needs, and it can be modified without affecting other users. An additional benefit is that this job description can be assigned to as many users as you want, giving groups of users access to the same libraries from a central location.

— Joe Hertvik Senior Technical Editor Midrange Computing

 

Automatically Refreshing Your WRKACTJOB Screen

 

You may not realize it, but you can set your Work with Active Jobs (WRKACTJOB) screen to automatically refresh itself after a set period of time. Here’s how you do it:

1. When you start WRKACTJOB, press F4 for a command prompt. On the Command Prompt screen, press F10 for additional parameters. This displays the Additional Parameters screen shown in Figure 2.

2. On the Additional Parameters screen, there is a parameter called INTERVAL (Automatic Refresh Interval) that specifies the number of seconds WRKACTJOB will wait before it refreshes itself while in refresh mode. The factory default is 300 seconds (5 minutes). If the INTERVAL value is set to *PRV, that means the value has been previously changed and WRKACTJOB is using the last changed value. To set your own value, change INTERVAL to any number between 5 seconds and 999 seconds. This will become your new default INTERVAL refresh rate and will be used whenever someone executes WRKACTJOB and puts the screen into refresh mode.

3. Press Enter to start WRKACTJOB.
4. To put WRKACTJOB into refresh mode, press F19 on your keyboard. WRKACTJOB will now refresh its data according to the schedule you established in the INTERVAL parameter. If you specified 30 seconds, for example, it will refresh the screen every 30 seconds. To exit from refresh mode, press F19 a second time and it will stop refreshing.

Be aware, however, that refresh mode is a restricted mode for WRKACTJOB. You cannot display information about running jobs while in refresh mode, and you are limited to using the following function keys:

F3: Exit
F10: Restart Statistics
F11: Display Elapsed Data
F12: Previous
F19: End Automatic Refresh

If you want to reconfigure WRKACTJOB using its other function key features (such as Include, Exclude, Sort, etc.), you must configure WRKACTJOB using these keys before you go into refresh mode. Refresh mode will redisplay current information based on how the WRKACTJOB screen was configured before refresh mode was started.

One last point: If you use WRKACTJOB in refresh mode, be careful that you don’t bog your AS/400 by using inappropriate parameters. You can refresh your screen

every five seconds if you want to, but the constant polling and refreshing of activity data will choke off your other jobs and negatively affect response time. Even the rate of 30 seconds I discuss here will somewhat affect performance. The key to using WRKACTJOB in refresh mode is to use it to gather data at whatever reasonable interval you wish and then end it as quickly as possible so that it doesn’t degrade your system performance.

— Joe Hertvik Senior Technical Editor Midrange Computing

 

How to Force Jobs to Run in Debug Mode

 

In our shop, programmers are restricted from updating production data by staying in debug mode. However, when a job in debug mode submits another job to run in batch, the new job does not run in debug mode. We needed a way for programmers’ batch jobs to run in debug mode also.

We accomplished this by using a customized routing entry program for our batch subsystem. We created a CL routing program that tests the current user profile for that of a programmer. If the user is a programmer, the program does a Start Debug (STRDBG) command and transfers control to the system program QCMD to continue execution.

Our program, which I’ll call ROUTINGCL, is shown in Figure 3. We changed the default routing entry attached to the batch subsystem to use our new CL program. This is done using the Change Routing Entry (CHGRTGE) command.

CHGRTGE SBSD(QBATCH) +

SEQNBR(9999) +

PGM(ROUTINGCL)

— Mark McCall This email address is being protected from spambots. You need JavaScript enabled to view it.

 

Check for Active Jobs from a Batch Program

 

Do you have jobs that need to run continuously but sometimes terminate for whatever reason? You can easily set up a CL program to check for active jobs in a specific job queue, and start jobs that should be active but are not. This program will check all of the jobs in a subsystem. If the job you specify is found, the CL program will terminate. If the job that you specify is not found, the CL program will submit a job to start it.

You will need to declare variables for job, user, and job number, and retrieve these variables with the Retrieve Job Attributes (RTVJOBA) command. You will also need to declare a file that contains one text field of 132 characters. This file will need to be created before the CL program is compiled. I have chosen QTEMP for the file’s library, because it requires no cleanup after the job ends.

First, trap all of the jobs currently running in the specified subsystem. Do this by using the Work with Subsystem Jobs (WRKSBSJOB) command, with the output going to *PRINT. Override the printer file QPDSPSBJ to hold on the output queue.

Next, copy the spooled file to the work file created in QTEMP, using the Copy Spooled File (CPYSPLF) command. This is where you will need the variables for job, user, and job number. Delete the spooled file after it is copied.

Finally, read the work file. Positions 4 through 13 contain the name of the job. Use the substring function to extract this field and compare it to the name of the job you are looking for. If you find the job, leave the program. If you do not find the job, read the next

record. If EOF is encountered and you have not found your job, submit it and exit the program.

The complete program is shown in Figure 4 You can put this program in your job scheduler to run at whatever frequency you desire, eliminating the need for an operator to check for these jobs on a regular basis.

— Lisa Patteson CMI Industries, Inc. Greensboro, NC

Editor’s note: This is a simple and easily implemented solution to a problem, but don’t forget that IBM has been known to change the format of reports. You may have to modify this program when upgrading to a new version or release, or installing PTFs.

 

Include IFS Files in Your Nightly Backup

 

If you are running the AS/400’s HTTP server for serving Web pages, you are probably storing HTML and other files on the AS/400’s Integrated File System (IFS). You may be storing other “PC-style” files in IFS directories on your AS/400. Are you backing this data up regularly?

Our Web materials are stored in a directory named /WEBSAMP. We back up all the files and subdirectories it contains by using the following command, which is included in our nightly backup process:

SAV DEV(‘/QSYSLIB/TAP02.DEVD’) +

OBJ((‘/WEBSAMP/*’))

Even though the Save Entire System command, run from option 21 of the SAV menu, does save them, you may be executing that command only on a monthly basis.

— Steve Swett Newaygo County CIMS Consortium

 

Shortcut Commands

 

Would you like to create a shortcut command to replace an often-keyed, lengthy command? You can create the command without creating a CL program to execute the long version of the command. The technique utilizes the QCMDEXC program as the command processing program (CPP).

You simply create a command that passes parameters to QCMDEXC as constants. The first parameter is the command string to be executed (whatever length you want), and the second parameter is a 15,5 length decimal field containing the length of the command string in parameter one.

For example, to create a shortcut command that executes the Work with Output Queue (WRKOUTQ) command to view the output queue QPRINT, create source member OQ (see Figure 5). When you create the command, specify QCMDEXC as the CPP. That’s all there is to it!

— Paul Jackson

 

Startup Program Customization

 

When I started a job as system administrator of a new AS/400 shop, the first thing I had to do was change the system startup program. The startup program is like the AUTOEXEC.BAT file on a DOS-based PC—the first job that runs when the system is

powered up. On the AS/400, it starts all the important subsystems such as QINTER, QBATCH, and QSPL, and it also starts up some jobs that need to be run at IPL time, such as the automatic cleanup. Like me, you may need to modify the startup program to add programs or start subsystems at IPL. Here’s how I did it.

I had to alter the program to start the RBTSLEEPER subsystem that runs Help/Systems’ Robot program. Since our startup program is the IBM-supplied program, QSTRUP, and IBM doesn’t supply the source code for it, I had to retrieve the source code, alter it to start RBTSLEEPER, recompile the program to a different library, and indicate to the AS/400 that it should run the modified code instead of the IBM-supplied program.

To retrieve the name of your startup program, run the Display System Value (DSPSYSVAL) command, specifying system value QSTRUPPGM. The system presents a panel that shows the name of the startup program.

If your startup program is QSTRUP in library QSYS, retrieve the source code for it with the Retrieve CL Source (RTVCLSRC) command, as follows:

RTVCLSRC PGM(QSYS/QSTRUP) +

SRCFILE(QGPL/QCLSRC) +

SRCMBR(*PGM)

This command places the source code in source file QGPL/QCLSRC, member QSTRUP. PDM then allows you to change the code. (You may, of course, use a different source file and library.) I compiled to QGPL (instead of QSYS) because I preferred to keep the original version of the program intact. That meant that I needed to change system value QSTRUPPGM to point to the new, updated program in QGPL rather than the original, IBM-supplied program in QSYS.

To change QSTRUPPGM, run the Work with System Values (WRKSYSVAL) command, position the system value list to QSTRUPPGM, and place an option 2 next to it. Then, type in the new name of the program and its library. In my case, the program name was the same (QSTRUP), but the library was QGPL.

At the next IPL, the operating system looked into system value QSTRUPPGM to determine what program to run at startup and consequently ran QGPL/QSTRUP. This procedure enabled me to start subsystem RBTSLEEPER at IPL and retrieve the CL code of the startup program for future modifications.

— Joe Hertvik Senior Technical Editor




Figure 1: If all else fails, you can type in the explicit AS/400 path name to the file you want to download or upload



TOP_TIPS-_Operations08-00.png 900x675

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: