Gotcha: Restricting DDS Field Name Lengths

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

One serious limitation of the RPG language is that variable names cannot be longer than six characters. This limitation tends to prevent names from having much meaning, or at least clear meaning.

When you begin programming in any other language, you may be tempted to take advantage of the ten characters DDS provides for variable names. After all, if you are going to program in another language, why cut your wings? And if you need to use RPG after all, you may think that you can always rename fields within the RPG program.

Not always! Fields defined for output only cannot be renamed in an RPG program, since RPG uses the I-specs for this function. Obviously, output-only fields cannot be coded in I-specs.

Therefore, if you use RPG even eventually, it is much safer to cut your wings and restrict your variable names to six characters. After all, you can always use the ALIAS keyword in your DDS to make up names up to thirty-one characters long.

Ernie Malaga Midrange Computing

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

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

  • 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

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