• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Glenn Wants To Know More Facts About Special Values

    November 28, 2012 Hey, Ted

    I found your article 10 Facts You Should Know about Special Values very interesting. I have a few questions related to a command I am writing.

    –Glenn

    I owe Glenn an apology. He is one of the many people whose email I never responded to. I’m sorry, Glenn. Sometimes life presents too many opportunities.

    Here’s Glenn’s first question:

    1. If a user specifies *ALL for a parameter, how do you prevent the user from typing in other values?

    Fair enough. Define *ALL in the Single Value (SNGVAL) keyword, not in the Special Value (SPCVAL) keyword.

    CMD        PROMPT('Do it')
    
    PARM KWD(RPTTYPE) TYPE(*DEC) LEN(1) RSTD(*YES) +
         DFT(*ALL) +
         SPCVAL((*CVNPRB 1) (*LIBSUM 2) (*LIBDTL 3) +
                (*OBJSUM 4) (*OBJDTL 5)) +
         SNGVAL((*ALL 0)) +
         MIN(0) MAX(5) +
         PROMPT('Type of report')
    

    Now you can run commands like these:

    DOIT RPTTYPE(*ALL)
    DOIT RPTTYPE(*LIBSUM *OBJSUM)
    DOIT RPTTYPE(*CVNPRB *LIBSUM *LIBDTL *OBJSUM *OBJDTL)
    

    But do this. . .

    DOIT RPTTYPE(*ALL *LIBSUM)
    

    . . .and you’ll get error CPD0094 (*ALL must be only value for parameter RPTTYPE).

    Now, Glenn’s second question:

    2. Can you prevent a user from keying in the same value more than once?

    No. Nothing will stop you from doing this:

    DOIT RPTTYPE(*LIBSUM *LIBSUM *LIBSUM *LIBSUM *LIBSUM)
    

    The system allows you to enter up to five values in the RPTTYPE parameter. If you want to waste a spot by duplicating a value, the system won’t object. It is up to the command-processing program to recognize and ignore duplicates.

    Glenn had two more questions, both of which deal with mixed lists. That will have to be a topic for another day.

    –Ted

    RELATED STORY

    10 Facts You Should Know about Special Values



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    VISUAL LANSA 16 WEBINAR

    Trying to balance stability and agility in your IBM i environment?

    Join this webinar and explore Visual LANSA 16 – our enhanced professional low-code platform designed to help organizations running on IBM i evolve seamlessly for what’s next.

    🎙️VISUAL LANSA 16 WEBINAR

    Break Monolithic IBM i Applications and Unlock New Value

    Explore modernization without rewriting. Decouple monolithic applications and extend their value through integration with modern services, web frameworks, and cloud technologies.

    🗓️ July 10, 2025

    ⏰ 9 AM – 10 AM CDT (4 PM to 5 PM CEST)

    See the webinar schedule in your time zone

    Register to join the webinar now

    What to Expect

    • Get to know Visual LANSA 16, its core features, latest enhancements, and use cases
    • Understand how you can transition to a MACH-aligned architecture to enable faster innovation
    • Discover native REST APIs, WebView2 support, cloud-ready Azure licensing, and more to help transform and scale your IBM i applications

    Read more about V16 here.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    ASNA:  Create great mobile apps with ILE RPG. Period.
    looksoftware:  Achieving the impossible with RPG Open Access. Live webcast Dec 4 & 5.
    ITJ Bookstore:  Bookstore BLOWOUT!! Up to 50% off all titles! Everything must go! Shop NOW

    IT Jungle Store Top Book Picks

    Bookstore Blowout! Up to 50% off all titles!

    The iSeries Express Web Implementer's Guide: Save 50%, Sale Price $29.50
    The iSeries Pocket Database Guide: Save 50%, Sale Price $29.50
    Easy Steps to Internet Programming for the System i: Save 50%, Sale Price $24.97
    The iSeries Pocket WebFacing Primer: Save 50%, Sale Price $19.50
    Migrating to WebSphere Express for iSeries: Save 50%, Sale Price $24.50
    Getting Started with WebSphere Express for iSeries: Save 50%, Sale Price $24.50
    The All-Everything Operating System: Save 50%, Sale Price $17.50
    The Best Joomla! Tutorial Ever!: Save 50%, Sale Price $9.98

    Jinfonet Speeds In-Memory OLAP with ‘Push Down’ Technology Power Systems Cloud Builders Get Huge Discounts

    Leave a Reply Cancel reply

Volume 12, Number 28 -- November 28, 2012
THIS ISSUE SPONSORED BY:

WorksRight Software
ProData Computer Services
Sirius Computer Solutions

Table of Contents

  • Write Your Own SCANRPL Built-In Function
  • Glenn Wants To Know More Facts About Special Values
  • Admin Alert: Strategically Using Power Systems’ Processor Trial Capacity On Demand

Content archive

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

Recent Posts

  • With Power11, Power Systems “Go To Eleven”
  • With Subscription Price, IBM i P20 And P30 Tiers Get Bigger Bundles
  • Izzi Buys CNX, Eyes Valence Port To System Z
  • IBM i Shops “Attacking” Security Concerns, Study Shows
  • IBM i PTF Guide, Volume 27, Number 26
  • 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

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