• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • String Parameters of Various Lengths, Take Two

    June 12, 2002 Timothy Prickett Morgan

    Dear Readers:

    Several people have written to point out errors in my solution to the reader who wanted to make an RPG subprocedure accept character parameters of any size. I need to correct the code that I provided in that issue of Midrange Guru, OS/400 Edition. (I plan to explore this topic more and to present the ideas of my respondents in the near future, so watch for more information in a future edition of Midrange Guru.)

    Here is the original question”

    “I have an RPG IV subprocedure that I call from several different programs. I use what I call the QCMDEXC method to pass a character string to it. That is, I pass two parameters–the character string and the length of the character string. I would like to eliminate the second parameter.”

    I failed to explain that the subprocedure needed to modify the string parameter. I made the mistake of including the CONST keyword on the string parameter while testing, but forgot to remove it before publication. As my demo subprocedure did not modify the string, the compiler did not catch my error.

    Here is the proper code (I hope).

    First, the procedure prototype:

    D MyProc          PR                  Opdesc            
    D   String                   32767    Options(*Varsize)
    

    Next, the subprocedure:

    H nomain                                                
                                                             
      /copy copysrc,myproc                               
      /copy copysrc,ceedod                                   
                                                             
     P MyProc          B                   Export            
      * Procedure Interface                                  
     D                 PI                  Opdesc            
     D   String                   32767    Options(*Varsize) 
                                                             
      * Variables for the CEEDOD API                         
     D DescType        s             10I 0                   
     D DataType        s             10I 0                   
     D DescInfo1       s             10I 0                   
     D DescInfo2       s             10I 0                   
     D DataLen         s             10I 0                   
                                                       
     * Retrieve the length of the string parameter            
    C                   Callp     CEEDOD(1: DescType:         
    C                                DataType : DescInfo1:    
    C                                DescInfo2 : DataLen :    
    C                                *OMIT)                   
                                                              
     * DataLen now contains the length of the input string    
                                                              
                                                              
     * Do whatever needs to be done                           
                                                              
    C                   Return                                
    P                 e                                       
    

    I apologize for the error.

    — Ted

    Sponsored By
    ADVANCED SYSTEMS CONCEPTS

    SEQUEL meets all your iSeries and AS/400 data access needs in a single, integrated solution:

    • Windows, Web or host user interfaces

  • Convert AS/400 data into PC file formats
  • E-mail or FTP query results, reports and spool files
  • Run-time prompted queries and reports for end users
  • IF-THEN-ELSE logic in queries and reports
  • Report, form and label formatting second to none
  • Easily convert date fields, character-to-numeric, numeric-to-character and other data manipulation
  • SORT or JOIN using a calculated field
  • Quick summarization of data with Tabling function
  • Run multiple SEQUEL requests as one with the SEQUEL Scripting function
  • OLAP Business Intelligence at a fraction of the cost of comparable solutions
  • Take 6 minutes to
    view a SEQUEL ViewPoint ScreenCam movie to see how simple Windows-based
    AS/400 and iSeries data access can be! In just a few short minutes, you
    can find out ways to make your job easier and improve data access throughout
    your organization. Download
    the ViewPoint movie here
    .

    For more information or a FREE trial of SEQUEL,
    call 847/605-1311 or visit Advanced Systems Concepts .

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 45 -- June 12, 2002

    Sponsored by
    PERFSCAN

    Revolutionary Performance Management Software

    At Greymine, we recognize there is a void in the IT world for a dedicated performance management company and also for a performance management tool that’s modern, easy to use, and doesn’t cost an arm and a leg. That’s why we created PERFSCAN.

    PERFSCAN is designed to make your job easier. With revolutionary technology, an easy-to-read report and graphics engine, and real time monitoring, tasks that used to take days can now take minutes. This means you will know your system better and will be able to provide better service to your customers.

    OUR FEATURES

    PERFSCAN is full of robust features that don’t require you to take a three-day class in order to use the product effectively.

    Customizable Performance Reporting

    Whether you are troubleshooting a major system problem or simply creating a monthly report, PERFSCAN lets you select any combination of desired performance metrics (CPU, Disk, and Memory).

    User Defined Performance Guidelines

    No matter if you are a managed service provider managing complex systems in the cloud or a customer analyzing your on-premises solution, PERFSCAN gives you the flexibility to define all mission critical guidelines how they need to be.

    Understanding The Impact Of Change

    Tired of all the finger pointing when performance is suffering? PERFSCAN’s innovative What’s Changed and Period vs. Period analysis creates a culture of proof by correlating known environmental changes with system performance metrics.

    Comprehensive Executive Summary

    Creating performance graphs is easy. Understanding what they mean is another thing. With one mouse click, PERFSCAN includes an easy-to-understand executive summary for each core metric analyzed.

    Combined Real-Time Monitor And Performance Analysis Tool

    With PERFSCAN’s combined built in enterprise real-time monitor and historical performance analysis capability, you will always know how your mission-critical systems are performing.

    Cloud Performance Reporting Is Easy

    Managing performance for production systems in the cloud can be a black hole to many system administrators. The good news is PERFSCAN analyzes all core metrics regardless of the location. That’s why MSPs and customers love PERFSCAN.

    Detailed Job Analysis

    PERFSCAN shows detailed top job analysis for any desired period. All metrics are displayed in two ways: Traditional Report and Percentage Breakdown Pie Chart. This toggle capability instantly shows the jobs using the most system resources.

    Save Report Capability

    Your boss lost the report you gave to him on Friday. Now what do you do? With PERFSCAN’s save report capability, any report can be retrieved in a matter of seconds.

    Professional PDF Reporting With Branding

    Creating professional looking reports for your customers has never been easier with PERFSCAN. Branding for our partners and service provider customers is easy with PERFSCAN.

    Check it out at perfscan.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Searching the Information Center Reader Feedback and Insights: Group Job Limitation

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 45

This Issue Sponsored By

    Table of Contents

    • Reader Feedback and Insights: Printing Leading Zeros in Query/400, Another Look
    • String Parameters of Various Lengths, Take Two
    • Build SQL to Define Your Existing Files, Revisited

    Content archive

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

    Recent Posts

    • Fortra Issues 20th State of IBM i Security Report
    • FNTS Launches Managed Services for Power Servers in IBM Cloud
    • Total LTO Shipped Capacity Up Slightly in 2022
    • Four Hundred Monitor, May 24
    • Update On Critical Security Vulnerability In PowerVM
    • Critical Security Vulnerability In PowerVM Hypervisor
    • IBM Power: Hosted On-Premises Or In The Cloud?
    • Guru: Watch Out For This Pitfall When Working With Integer Columns
    • As I See It: Bob-the-Bot
    • IBM i PTF Guide, Volume 25, Number 21

    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 © 2023 IT Jungle