• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • CPYSPLF and AFPDS

    February 23, 2005 Ted Holt

    Printing is one of the primary concerns of people who use computers for what I still refer to as data processing, so it’s no wonder I have received a good bit of mail in response to printing-centric articles such as Page 1 of X, Reading Spool Files in RPG, and Extract Reports from Disk Files. Since packaged software is so widely used in installations staffed by readers of this publication, several people have asked about a CPYSPLF equivalent that works with AFPDS. Today, I address that issue.

    At least one astute reader of this publication pointed out

    …

    Read more
  • SQL Can Return One or a Few Records

    February 23, 2005 Hey Ted

    SQL’s SELECT INTO statement works fine as long as only one record matches the criteria in the WHERE clause. If the query returns more than one record, the host variables are loaded with data, but the SQL State variable, SQLSTT, has a value of 21000, which according to the manual indicates a “Cardinality Violation.” Can I assume that the record loaded into the host variables really is the first record in the returned dataset? Or do you have a better suggestion?

    –Brad

    I suspect that the data in the host variables comes from the record you’re looking for, but being

    …

    Read more
  • Admin Alert: Configuring Output Queues to Print Multi-Copy Spooled Files on Remote Printers

    February 23, 2005 Joe Hertvik

    Like most business computers, OS/400 can send spooled file output to printers located on either a local or a remote system. Spooling to a remote printer is not without its hazards, however. One of the more common problems lies in configuring OS/400 to print multiple copies of a single spooled file on a remote printer. Here’s the rundown on how this problem works, the quick fix to make it go away, and a gotcha.

    I recently ran into this problem on an IBM 6400 printer that we had networked through a NetGear print server, setting it up as a remote

    …

    Read more
  • OPNQRYF and ILE

    February 16, 2005 Hey, Ted

    I converted an RPG/400 program to ILE RPG, and now the OPNQRYF in the calling CL program no longer works. Doesn’t OPNQRYF work with ILE?

    –Tracy

    I have two interactive inquiries, and each one consists of a CL program that runs OPNQRYF, then calls an RPG program that loads a subfile and displays the results of the query. The user wants to be able to press a command key while in one inquiry screen to run the other inquiry. However, the call ends abnormally, sending message CPF4174 (Control language program INQPGM in library MYLIB detected an error at statement number

    …

    Read more
  • Remove Misleading Messages from Job Logs

    February 16, 2005 Hey Ted

    Job logs get too large in our shop, and it’s hard to find the information that helps us determine why a program went wrong. How can we reduce the size of our job logs? Specifically, how can we keep from writing messages that are not really errors? An example would be a CL command that we’ve monitored for that may or may not fail.

    –Mitch

    I understand your concern. I can think of a lot of more useful things to do with my time than wading through a job log of hundreds of pages. I am familiar with one application

    …

    Read more
  • Admin Alert: Making a Remote Output Queue Look Like a Printer Device

    February 16, 2005 Joe Hertvik

    There are two types of OS/400 and i5/OS printers: printer devices and remote output queues. In general, printer devices are used to define local printers that are either directly attached to or are controlled from an AS/400, iSeries, or i5 box (such as iSeries access printers and locally attached printers), while remote output queues are spooling writers that send OS/400 spool output to a printer located on a remote system. Each device type serves a different function, and both types are started by different OS/400 commands.

    Although remote output queues are necessary constructs when dealing with off-system printers, a problem

    …

    Read more
  • The Integrated File System for Intelligent People

    February 9, 2005 Ted Holt

    Recent e-mails from several faithful readers have reminded me that I should pay more attention to the fundamentals than I do. For that reason, I’ve delayed for one month the article that I was going to run this time and have instead written about the Integrated File System from the ground up. The IFS is too important to be ignored. Next month I will cover a more advanced topic that I hope many of you will find practical and of interest.

    One of these recent e-mails was from a reader who thought that IFS was just a fancy name for

    …

    Read more
  • Limiting All-Object Authority

    February 9, 2005 Hey, Wayne O.

    Is there a way to minimize the access to a file that contains salaries, for the user profiles that have *ALLOBJ authority? Can we give them access to the object but not to the content (data)? Is our only option to audit these user profiles and the files containing the salaries?

    –Marc-André

    People frequently ask me how to block access to an object for users with *ALLOBJ special authority. When the system determines a user’s authority to an object, the first check made is whether the user has *ALLOBJ authority. If the answer is yes, the system allows the user

    …

    Read more
  • Running Query Without Adopted Authority

    February 9, 2005 Hey, Ted

    Because of the Sarbanes/Oxley Act, we are tightening our security. One problem we have is using AS/400 Query. Several of our menus include options that run the Work with Queries command. The problem is that a user who takes one of these options is running WRKQRY under adopted authority, and therefore has access to files that should from now on be secured. How can we change the WRKQRY command so that the user does not have adopted authority?

    –Lin

    You can’t change the command. You may be able to change the command-processing program, QSYS/QQUDA, but I don’t like to monkey

    …

    Read more
  • Repeated Characters in SQL

    February 2, 2005 Hey, Ted

    Using SQL, how do I fill a 128-byte character field with asterisks? Please don’t tell me I have to key every one of those puppies into my SQL command.

    –Jack

    I’ve got good news. Use the SPACE function to generate 128 spaces. Use the TRANSLATE function to convert the spaces into asterisks.

    insert into somefile (somefield)
            values (translate(space(128),'*',' '))
    

    Or use the REPLACE function to convert the spaces into asterisks.

    insert into somefile (somefield)
            values (replace(space(128),' ','*'))
    

    I haven’t run any speed tests, but TRANSLATE seems to run faster than REPLACE.

    If you had wanted to fill your field with

    …

    Read more

Previous Articles Next Articles

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle