Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
IBM QSYSINC /COPY Members Suck, right?
has no ratings.
Published: 25 Jan 2012
Revised: 23 Jan 2013 - 4083 days ago
Last viewed on: 28 Mar 2024 (6038 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

IBM QSYSINC /COPY Members Suck, right? Published by: Bob Cozzi on 25 Jan 2012 view comments(3)

It is 2012 and IBM's QSYSINC members still suck. What is going on here!

  • They still use B (binary) fields.
  • They declare named constants with the same name as the API name.
  • They use UNqualified Data Structures.
  • They use Subfield names that remind me of System/34 limitations.
  • They do not initialize the data structures.
  • Prototypes for the actual APIs are virtually non-existent.

New Rule: Nothing new ships until the APIs are prototyped in all languages and the corresponding supporting data structure are correctly prototyped and tested.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: IBM QSYSINC /COPY Members Suck, right?
Posted: 12 years 2 months 4 days 18 hours 33 minutes ago

I almost never use them directly using /COPY, for many of the reasons you listed. They are sometimes helpful for getting the offsets right when creating my own copy members. A few more things to add to the list...

  • They should use declared length instead of from/to. (OVERLAY would be optional, depending on whether or not you include reserved areas. It does help match up the fields with the API documentation.)
  • How about TEMPLATE? This has the beneficial side effect that your LIKEDS makes it qualified.
  • There's nothing for dealing with variable length output structures. They suggest that you can add fields by naming them on /COPY with blank definition type, but that is hard to read and only works if the particular format you need is the last thing in the copy member.
Posted by: neilrh
Premium member *
Jackson, MI
Comment on: IBM QSYSINC /COPY Members Suck, right?
Posted: 12 years 2 months 3 days 16 hours 15 minutes ago
Edited: Thu, 26 Jan, 2012 at 14:28:28 (4446 days ago)

Far too many /copy sources, both IBM and published in the wild, quite frankly suck.  Do any of these people revisit their work and update it for modern standards?  Do any of them realise you can now use Length/OVERLAY rather than From/To?

And we wonder why nobody learns RPG anymore, when trainers seem to be using techniques that are depricated.

Personally if I do manage to find a DS or plist that meets my needs - I rework it to a more modern coding style.  And what's with IBM publishing most new prototypes in C only??

Posted by: ChrisHiebert
Premium member *
Comment on: IBM QSYSINC /COPY Members Suck, right?
Posted: 12 years 6 days 12 hours 7 minutes ago

The only reason I have found to look at the QSYSINC copy books was to convert them into something we could actually use and read. The field names they define are horrendous, but that is mostly because they don't use QUALIFIED and have to make all the names unique.