• Share
  • ?
  • Profiles ▼
  • Communities ▼
  • Apps ▼

Blogs

  • My Blogs
  • Public Blogs
  • My Updates

RPG Cafe Blog

  • Log in to participate
b542d3ac-0785-4b6f-8e53-f72051460822 Blog

About this blog

RPG Cafe Community This is the place for RPG developers and IBM developers to mingle and discuss our favorite language. We'll talk about the language itself, its history, and its future. We will discuss the tools that support it and the directions they are taking.
  • Facebook
  • Twitter
  • Google
  • LinkedIn
  • RSS

Archive

  • March 2018
  • November 2017
  • April 2017
  • March 2017
  • February 2017
  • November 2016
  • September 2016
  • April 2016
  • January 2016
  • November 2015
  • May 2015
  • October 2014
  • August 2014
  • April 2014
  • January 2014
  • November 2013
  • October 2013
  • June 2013
  • April 2013
  • December 2012
  • November 2012
  • June 2012
  • March 2012
  • February 2012
  • January 2012
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • April 2011
  • September 2010
  • July 2010
  • September 2009
  • July 2009
  • April 2009
  • March 2009
  • November 2008

Tags

Recent tweets

    >> Follow @ibmrational on Twitter
    All posts
    • Sort by:
    • Date ▲
    • Title
    • Likes
    • Comments
    • Views

    Welcome to the RPG Development team blog

    barbara_morris 120000DX5W | | Visits (3812)
    The RPG compiler development team handles the design, development, testing and documentation of the RPG compilers. We are part of a larger team that also develops RDi and RTCi. The team is situated in Toronto, Ontario, Canada.

    Tags:  rpg rpgcafe

    Performance tip

    barbara_morris 120000DX5W | | Visits (4639)
    Here is the tip: Beware of performance tips For me, the performance rule that never changes is this one: Always question any rule you hear about X performing badly, or Y performing better than Z. Was it ever true? Is it still true? Might it change in the future? Can I measure the difference? Does it apply to my current situation? Does the difference matter enough to code in a more complex or error-prone way? The trouble with performance rules is...   [Continue Reading]


    Tags:  rpgcafe

    What is Web 2.0?

    batthis 110000AH43 | | Visits (5560)
    If you are in the Toronto area, the Toronto User Group TEC 2009 conference starts next week Tue (Mar 24-26) For those curious about Web 2.0, latest trends, and how it can be consumed or produced on IBM i, George Papayiannis and myself will be presenting a session called "What is Web 2.0?" Tue @2:55.

    Tags:  blogs social_networking wikis atom rpgcafe twitter web2.0 rss ajax mashups ibm_i

    Notes from RPG & DB2 Summit in Orlando

    barbara_morris 120000DX5W | | Visits (4742)
    Orlando Summit is almost over. Except for the (not unexpected) lower attendance, it has been an excellent Summit. The Summit attendees are always very motivated to learn; almost all of them attend a session in every available time slot. Over 80% of them even attend the 8 am "early bird" sessions. That's dedication. But if possible, everyone here seemed even more motivated to learn than usual. People asked more questions (and more...   [Continue Reading]


    Tags:  rpgcafe rpg summit rtci

    Everyone should be coding the CCSID(*CHAR) keyword

    barbara_morris 120000DX5W | | Comments (2) | Visits (10594)
    The problem Strange but true: By default, RPG assumes that the CCSID of alphanumeric data is the mixed double-byte + single-byte CCSID that is related to the job CCSID. This matters when all of the following conditions are met (very common) the actual job CCSID is a single-byte CCSID such as 37 (quite common) conversions are done between alphanumeric data and UCS-2 data (rare) the alphanumeric data contains shift characters (x'0E' or x'0F')When...   [Continue Reading]


    Tags:  ccsid rpg rpgcafe

    From ENDDO to LIKEFILE - my 20th RPG anniversary

    barbara_morris 120000DX5W | | Comments (5) | Visits (5665)
    Today is the 20th anniversary of my arrival at IBM and also my arrival in the AS/400 RPG Compiler Development department. The day I arrived, almost everyone was on vacation - there were only 3 other people working. It was near the end of development for V1R3. My first couple of days were spent on an off-site RPG II self-study course, with no actual computer but only coding sheets to work with. Much of my time was spent scratching my head...   [Continue Reading]


    Tags:  rpg rpgcafe

    RPG's "Move fields" logic, and its cousin EVAL-CORR

    barbara_morris 120000DX5W | | Comment (1) | Visits (8482)
    One of the cool features of RPG is the "move fields" logic where data is moved from input buffers to program fields and from program fields to output buffers. Most RPG programmers don't think of this as cool - it is so fundamental to RPG that RPG programmers take it for granted. When the RPG programmer defines a file in the RPG source, the compiler implicitly generates an internal program field for each field in the file, and the compiler also...   [Continue Reading]


    Tags:  rpg rpgcafe

    Everyone knows what X'7D' means ... unfortunately

    barbara_morris 120000DX5W | | Comment (1) | Visits (13506)
    cmd = 'ADDPFM LIB/FILE MBR(' + mbr + ') ' + 'TEXT(' + X'7D' + text + X'7D' + ')'; Unfortunately, I think too many RPG programmers know what X'7D' means. I don't know how it happened that it's considered normal to code X'7D' when a single quote is wanted in an RPG program, but it's a very common coding technique. RPG already has syntax for a single quote character. Similar to 'A' being a single A character, you code '''' for a single quote...   [Continue Reading]


    Tags:  rpgcafe rpg quote

    An H spec keyword that you might be missing

    barbara_morris 120000DX5W | | Comments (2) | Visits (8837)
    CCSID(*CHAR : *JOBRUN) Do you have this keyword in your H spec copy file that gets copied into all your source? Or if you don't use a copy file, do you have this option in all your source? You should almost certainly have this keyword. It was introduced officially in V5R3, and through PTFs in V5R1 and V5R2. Why do you need this keyword? RPG has a very strange default way of dealing with the CCSID of alphanumeric data. It should be assuming that...   [Continue Reading]


    Tags:  rpgcafe rpg

    Is debug active? Here's a procedure that tells you

    barbara_morris 120000DX5W | | Visits (5430)
    Do you ever want some code to run only when the debugger is active?  Here's a procedure you can call to find out: Test program /copy indebug /free if inDebug(); dsply ('The debugger is active'); else; dsply ('The debugger is not active'); endif; return; Member INDEBUG_PR containing the prototype /if not defined INDEBUG_INCLUDED D inDebug pr n extproc('inDebug') /define...   [Continue Reading]


    Tags:  rpgcafe debug

    PTFs to make it easier to use data structures for subfile I/O

    barbara_morris 120000DX5W | | Comments (2) | Visits (7098)
    During testing for Open Access, we were reminded of how awkward it is to use a data structure for I/O to subfiles.  Subfiles always use the WRITE operation and at least one of either the CHAIN or READC operations, and possibly the UPDATE operation.  This requires a *INPUT data structure and a *OUTPUT data structure. This isn't unique to subfiles; it's a problem for any record that is used for both input and output.  But it's always a problem for...   [Continue Reading]


    Tags:  subfile rpgcafe

    PCML support for Date, Time, Timestamp and 8-byte unsigned

    barbara_morris 120000DX5W | | Visits (5306)
    There is a thread in the JTOpen/Toolbox forum about PCML support for Date, Time, and Timestamp.  Late in 2010, the toolbox itself announced support for these types, in version 6.0 of PCML. http://www-912.ibm.com/j_dir/JTOpen.nsf/%28$All%29/7589FDA21CB026B3862576170058B28A?OpenDocument Now there's some further progress on this.  See my response to the thread, about RPG compiler support (and a general comment about upcoming IWS support). ...   [Continue Reading]


    Tags:  rpgcafe pcml

    New site for Rational Developer for Power demos, cool Screen and Report Designer vide

    EdmundReinhardt 110000PPES | | Visits (7427)
     Great news everybody, The development team for Rational Developer for Power have been very busy producing videos and demos to illustrate how to install configure, use projects, edit, navigate source, validate, build, debug on our supported languages on IBM i, AIX, and Linux. The IBM i demos are just getting started, but check out the very slick demos of Screen and Report Designer.  You will learn trick and techniques in becoming even...   [Continue Reading]


    Tags:  videos rational-ac-em rational-ac rdpower ibmi enablement rational-ac-power-app-mod... rational-ac-power-dev demos dds resource em

    Which is better, a return code or an exception?

    barbara_morris 120000DX5W | | Visits (5685)
    When writing a procedure that might want to indicate an error condition, you have three choices: You can use the return value to indicate success or failure, you can have a separate "return code" parameter, or you can send an exception to indicate failure.   Using exceptions rather than return codes leads to the most robust applications, and an exception based application can also give the cleanest code, since return codes...   [Continue Reading]


    Tags:  rpg_cafe

    Negative variable names

    barbara_morris 120000DX5W | | Visits (5139)
    I don't know whether it's my own mental defect, or if it's more universal, but I find it awkward to understand code using variables that mean something negative. I find I have to exercise my brain more to understand the first "IF" than the second in the following two snippets of code. My brain freezes up just a little bit when it tries to understand setting notValid to off. But it has no trouble understanding setting isValid...   [Continue Reading]


    Tags:  rpgcafe

    New keyword VALIDATE(*NODATETIME)

    barbara_morris 120000DX5W | | Visits (5986)
    A new H spec keyword, VALIDATE(*NODATETIME), is added for 6.1 and 7.1 through RPG compiler PTFs. The keyword indicates that date/time/timestamp validation will not necessarily be performed. A side-effect of this (and the reason for it) is that if validation is not required, there are some cases where d/t/z data can be treated as though it were alphanumeric data, making assignments and comparisons much faster. See this page in the RPG Cafe wiki...   [Continue Reading]


    Tags:  rpgcafe

    V1R1M1 of Open Access allows try and buy

    barbara_morris 120000DX5W | | Visits (4783)
    I was on vacation when IBM announced the V1R1M1 of the Open Access product 5733-OAR, so I'm a bit late mentioning it here in the Cafe.   This is exciting for me because it allows try-and-buy, so RPG programmers will be able to try Open Access for up to 70 days without having to actually purchase the product. Other than the licensing change, there's nothing new in V1R1M1. Open Access behaves the same at compile-time and runtime whether you have...   [Continue Reading]


    Tags:  openaccess rpgcafe

    A couple of articles about using Open Access with database IO

    barbara_morris 120000DX5W | | Visits (5478)
    I'm always pleased to see articles about Open Access, and especially articles that show how Open Access can be used for more than modernizing a user interface (WORKSTN files). Here are a couple of articles about Open Access being used for SQL database access (DISK files).   Here's an article by Daniel Cruikshank of IBM about using Open Access to take advantage of programming techniques only available via SQL programming, using RPG I/O opcodes....   [Continue Reading]


    Tags:  openaccess rpgcafe

    Open Access to be available to all RPG programmers!

    barbara_morris 120000DX5W | | Visits (9206)
    This is a very exciting day for me. Today, IBM announced that PTFs will soon be available to make the function of Open Access available without needing a license for product 5733-OAR.   For those of you who have not tried Open Access yet, I hope you will try it when the PTFs become available, and that you have as much fun as I have had exploring what you can do with it. Open Access is intended to be used for much more than modernize your WORKSTN...   [Continue Reading]


    Tags:  rpg open_access oar

    The Open Access PTFs are now available

    barbara_morris 120000DX5W | | Visits (6254)
    The Open-Access PTFs are all available. The PTF details are here: RPG Cafe wiki: Open Access Announcement

    Tags:  open_access rpg ptfs

    Why use the TEMPLATE keyword?

    barbara_morris 120000DX5W | | Visits (12939)
    The TEMPLATE keyword was added to RPG in 6.1. When you use the TEMPLATE keyword on a standalone field or data structure, the compiler will only allow you to use that definition for other LIKE or LIKEDS definitions, and for a couple of built-in functions, %SIZE and %ELEM.   Prior to 6.1, when people wanted to define a field or data structure to be used as a template, they often defined it as BASED on a pointer, where the pointer would never be...   [Continue Reading]


    Tags:  rpg_cafe

    Have you tried passing a file as a parameter yet?

    barbara_morris 120000DX5W | | Visits (6509)
    If you haven't tried file parameters yet (new in 6.1 for RPG), check out this article Sharing In V6 ( http://www.itjungle.com/fhg/fhg032112-story01.html ), by Jon Paris, in the Four Hundred Guru ( http://www.itjungle.com/fhg/fhgindex.html ).

    Tags:  rpgcafe

    New H spec keyword CCSIDCVT

    barbara_morris 120000DX5W | | Visits (5561)
    A new H spec keyword, CCSIDCVT, is added through PTFs for 6.1 and 7.1. For full details, see http://ibm.biz/BdxXWJ .   The main reason for this keyword is so that RPG programmers can be aware of data loss due to CCSID conversions. Data loss occurs when a character in the source data doesn't have a matching character in the target character set. This happens most commonly when converting from UCS-2 to alphanumeric or DBCS.   You can use...   [Continue Reading]


    Tags:  ccsidcvt rpgcafe ccsid

    RPG tutorial for experienced programmers new to RPG

    barbara_morris 120000DX5W | | Visits (8350)
    In the wiki of the RPG Cafe, I just posted the first (?) five chapters of a tutorial for experienced programmers who are new to RPG. I hope to add more chapters later. Here's the short URL for the main page of the tutorial: https://ibm.biz/Bdxz99

    Tags:  rpg tutorial

    Article by Scott Hanson: Debug those mysterious problems with your application's memory

    barbara_morris 120000DX5W | | Visits (5107)
    Here's an article by Scott Hanson of IBM, about how to debug problems with heap storage (storage that you allocate using %alloc or %realloc). https://www.ibm.com/developerworks/ibmi/library/i-mysterious_application/

    Tags:  alloc rpg debug heap

    If you formerly followed the RPG Cafe forum, you have to re-follow the migrated forum

    barbara_morris 120000DX5W | | Visits (3556)
    As you may know from seeing the notices posted on developerWorks in the past few months, the developerWorks forums were recently migrated to IBM Connections. Unfortunately, the "follow" information could not be migrated, so you have to re-follow the new version of the forums you were following. To follow a Connections forum, click on "Following actions" near the top right of the forum page, and then click on "Follow this...   [Continue Reading]

    Which is better? Divide by 2 or multiply by 0.5?

    barbara_morris 120000DX5W | | Visits (9054)
    I recently got a note from Ted Holt of Four Hundred Guru asking whether the old rule about multiplication being faster than division still applies for RPG on IBM i. For example, if you want to divide by two, this rule suggests that you should instead multiply by 0.5. I have known of this rule for a long time, and I have been automatically following it, without wondering whether it was still necessary. I was reminded of of...   [Continue Reading]

    Did you ever get weird errors after you called an API?

    barbara_morris 120000DX5W | | Visits (3349)
    Here are the top 3 mistakes I see people make that can cause storage corruption. Storage corruption can then cause strange and sometimes intermittent errors to occur. Mistake: Not passing the feedback parameter for CEE APIs When the API documentation says a parameter is "omissible", it means you can pass *OMIT as the parameter. It doesn't mean you can completely leave it out. On your RPG prototype, code OPTIONS(*OMIT). When you pass...   [Continue Reading]

    New version of the wiki article on converting C prototypes to RPG

    barbara_morris 120000DX5W | | Visits (3633)
    The article on converting C prototypes to RPG has had a major overhaul. https://ibm.biz/BdxQbC The old version was written from a pre-V5R1 perspective, with some remarks about post V5R1 or 6.1 coding. The new version is written from a 6.1 perspective, using QUALIFIED and TEMPLATE as a matter of course, with some side remarks about how to handle TEMPLATE in pre-6.1 coding. All the discussion about pre-V5R1 coding has been removed. Also, the...   [Continue Reading]

    Coming soon to your 7.1 system: An entire program in free-form RPG!

    barbara_morris 120000DX5W | | Visits (7907)
    Yes, I really mean that you will be able to write an entire program in free-form RPG! Yes, I really mean that it is coming soon! Yes, I really mean that it is for 7.1! As part of Technology Refresh 7, the ILE RPG compiler will be updated with support for free-form H, F, D, and P specs. Read more about this enhancement here, in the RPG Cafe wiki:...   [Continue Reading]


    Tags:  rpgcafe rpg_cafe rpgfree rpg
    • Show:
    • 10
    • 20
    • 30
    • Previous
    • Next
    1 2