Will free format work with V4R5?

Thanks,

Justin Houchin
Programmer
Reliatek, Inc
jhouchin9@charter.net
----- Original Message -----
From: "Mark A. Manske" <mmanske@minter-weisman.com>
To: <rpg400-l@midrange.com>
Sent: Tuesday, April 23, 2002 1:30 PM
Subject: RE: Free Format RPG


> Its one of those things that us old timers have been waiting for with
> baited breath for a long time; with V5R1 it has arrived!
> Some like the way it was implemented, some do not, it is what it is.
>
> It takes away the constraints of the old format (factor 1, op code,
> factor 2, result field...)
>
> Here is a short example I did to clean up a file here I just used
> PDM/(seu for us more experienced folks), and compiled.
>
>
>  /Copy MWSRCLIB/QCPYLESRC,H_Spec
>
>  *===============================================================*
> Fcustchlf  uf   e           k disk
> Farlcu     uf   e           k disk
>
> *****************************************************************
> ***** MAINLINE ****
> *****************************************************************
>
> C     key           KLIST
> C                   KFLD                    cchain
> C                   KFLD                    csname
>
> C     keyar         KLIST
> C                   KFLD                    cuco
> C                   KFLD                    cucuno
>
>
> /free
>
>     // set variables
>            cchain = 218      ;
>            cuco   = '  001'  ;
>
>
>     // Loop thru the customer master by chain number
>
>      Setll  key custchlf     ;
>      read       custchlf     ;
>
>  DOw    Not %EOF(custchlf)   AND   cchain = 218 ;
>
>     // update the bill to data with the ship to data
>          cbname  = csname  ;
>          cbadd1  = csadd1  ;
>          cbadd2  = csadd2  ;
>          cbcity  = cscity  ;
>          cbst    = csst    ;
>          cbzip   = cszip   ;
>          cbphon  = csphon  ;
>          cbfaxn  = csfaxn  ;
>     // Change statement policy to monthly, was weekly
>          cstmtt  = 'M'     ;
>
>
>    // update the data
>         update    custrec ;
>
>
>
>                         %subst(cucuno:10:5) = %trimR(%editc(ccust#:'Z')) ;
>      chain keyar arlcu ;
>
>        If %found(arlcu)             ;
>   // update the bill to data with the ship to data
>          cuname = csname            ;
>          cuadr1 = csadd1            ;
>
>           cuadr2 = csadd2            ;
>           cucity = cscity            ;
>           custat = csst              ;
>           cutel  = %editW(csphon:'   .   .    ') ;
>           cufax  = %editW(csfaxn:'   .   .    ')  ;
>           cupost = %editC(cszip:'Z') ;
>      // Change statement policy to monthly, was weekly
>           custpc  = 'M    '  ;
>         update ARRCU                 ;
>         endif                        ;
>
>
>
>         read      custchlf ;
>   ENDDO ;
>
>         *inlr = '1' ;
>
>  /end-free
>
>
> The /copy is a standard here (basically stops i/o for debugging).
> Notice the ; after each line - that tells the compiler that this is
> the end of a "statement".  A couple of things I just did not have time
> to even research where the complex keys; so I just cannibalized what I had
> just to get it to work for now.
>
> Also notice the // to signify a comment, along with the directive to tell
> the compiler where the "free" code starts(/free) and ends(/end-free)
>
> This starts to look similar to basic; notice instead of eval a = b,
> you can just code a = b.
>
> Some things you will have to hit the manuals for, as not all functions
> are usable in free format (some made no sense to put in, some just are
> "too old fashioned" to have been useful in the new layout.
>
> A slight learning curve will ensue, and you can freak out your colleagues.
> The RPG ILE manuals will have all you need to get you running.
> I do not know of any conversion tools like when we went from rpg to ile;
> but give it some time.  Just code and debug to see what you get, and
> stretch you mind beyond those restrictive columns.
>
>
> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
> Behalf Of Justin Houchin
> Sent: Tuesday, April 23, 2002 1:01 PM
> To: RPG Midrange
> Subject: Free Format RPG
>
>
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Could someone fill me in on free format RPG???
>
>
> Thanks,
>
> Justin Houchin
> Programmer
> Reliatek, Inc
> jhouchin9@charter.net
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2021 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.