× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

> How about the opcode extensions that _only_ work in /Free and the probability
> that more of these will appear in the future.

For me, the biggest reason for /FREE is the extra space it provides me
with.  With the "extended factor 2" syntax, I was FOREVER running out of
space on a line, and then was faced with the problem "how I can break this
line of code up and have it still look elegant?"

I do like being able to indent.  And once in a blue moon, the new op-codes
are useful for something.  But the #1 reason is the extra space on the
line.

For example, in free-form I can do this:

   trackRequest =
     '<?xml version="1.0"?>'                                 + CRLF +
     '<TrackRequest xml:lang="en-US">'                       + CRLF +
        '<Request>'                                          + CRLF +
           '<TransactionReference>'                          + CRLF +
              '<CustomerContext>Example 1</CustomerContext>' + CRLF +
              '<XpciVersion>1.0001</XpciVersion>'            + CRLF +
           '</TransactionReference>'                         + CRLF +
           '<RequestAction>Track</RequestAction>'            + CRLF +
           '<RequestOption>activity</RequestOption>'         + CRLF +
        '</Request>'                                         + CRLF +
        '<TrackingNumber>' + TrackingNo + '</TrackingNumber>'+ CRLF +
     '</TrackRequest>'                                       + CRLF ;

In fixed, it looks like this:
c                   eval      data =
c                             '<?xml version="1.0"?>' + CRLF +
c                             '<TrackRequest xml:lang="en-US">' + CRLF+
c                             '<Request>' + CRLF +
c                             '<TransactionReference>' + CRLF +
c                             '<CustomerContext>Example 1</Customer'+
c                             'Context>' + CRLF +
c                             '<XpciVersion>1.0001</XpciVersion>'+CRLF+
c                             '</TransactionReference>' +
c                             '<RequestAction>Track</RequestAction>'+
c                             CRLF +
c                             '<RequestOption>activity</Request' +
c                             'Option>' + CRLF +
c                             '</Request>' + CRLF +
c                             '<TrackingNumber>' +
c                             %trim(tracknum) + '</TrackingNumber>'+
c                             CRLF + '</TrackRequest>' + CRLF


Or, maybe you want to run a CL command:

    Command = 'CRTTAPF FILE(QTEMP/TAPEDATA) '
            +         ' DEV(' + %trim(peDevice) + ') '
            +         ' VOL(' + %trim(peVolume) + ') '
            +         ' REELS(*SL 1) '
            +         ' SEQNBR(' + %trim(%editc(peSeqNbr:'Z')) +') '
            +         ' LABEL(' + %trim(peLabel) + ') '
            +         ' FILETYPE(*DATA) '
            +         ' RCDLEN(*CALC) '
            +         ' BLKLEN(8200) '
            +         ' RCDBLKFMT(*V) '
            +         ' DENSITY(' + %trim(peDensity) + ') '
            +         ' ENDOPT(' + %trim(peEndOpt) + ') '
            +         ' CODE(*EBCDIC) '
            +         ' COMPACT(' + %trim(peCompact) + ') '
            +         ' REPLACE(*YES)' ;

    QCMDEXC(Command: %len(Command));

Instead of:

     c                   eval      Command = 'CRTTAPF FILE(QTEMP/TAPEDATA) '+
     c                                     + 'DEV(' + %trim(peDevice) +
     c                                     ') VOL(' + %trim(peVolume) +
     c                                     ') REELS(*SL 1) ' +
     c                                     ') SEQNBR( ' +
     c                                     %Trim(%editc(peSeqNbr:'Z')) +
     c                                     ') LABEL(' + %trim(peLabel) +
     c                                     ') FILETYPE(*DATA) ' +
     c                                     'RCDLEN(*CALC) ' +
     c                                     'BLKLEN(8200) ' +
     c                                     'RCDBLKFMT(*V) ' +
     c                                     'DENSITY(' + %trim(peDensity) +
     c                                     ') ENDOPT(' + %trim(peEndOpt) +
     c                                     ') CODE(*EBCDIC) ' +
     c                                     'COMPACT(' + %trim(peCompact) +
     c                                     ') REPLACE(*YES)'
     c                   callp     QCMDEXC(Command: %len(Command))

Every day I do SOMETHING like this... sometimes it's a subprocedure that
has long parameters (such as a URL or IFS pathname) other days its a CL
command or a text document or an XML document...  Most days it's MANY
things like this.

It just seems like such a horrible waste for half of each source record to
be taken up by 'C' followed by a bunch of useless spaces when I'm
struggling with how to make things fit all the time.

My opinion of the other concerns people have raised:

a) Semi-colons aren't a big deal to me. I'm used to having to specify them
differently in RPG vs C vs Java vs Perl...  it's nothing new.

b) Missing op-codes?  I hear this complaint ALL THE TIME on this list, yet
never once I have I had to switch back to fixed to do something. NOT EVEN
ONCE.

c) Typing /free and /end-free?  Yeah, that can be a little bit of a
nuisance. But, weigh the alternatives!  It's not nearly as bad as typing
'C' followed by 300 spaces.  It's not even close to as bad as wrapping my
code every 30 characters or so.

d) Not having free-form H, F, D, I, O, P specs?  It really doesn't matter
to me. H-specs are more or less free form anyway, and have been since RPG
IV debuted.  F-specs... I've never had the desire to indent an f-spec, and
I almost never run out of space.  I & O specs I hardly ever use.  D-specs
MIGHT be nice to have free-form, since I could use the extra space for
CLASS(), EXTPROC(), OPTIONS(), etc keywords.but this usually isn't a big
problem. It's almost universally C-specs where I need /FREE.

I'd MUCH rather have the RPG team work on giving us more functionality
than reinventing H,F,D,I,O,P specs!


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.