MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » February 1998

Re: CL enhancements



fixed



RE:     Re: CL enhancements

=>>** Reply to note from John Carr <74711.77@compuserve.com> Fri, 20 Feb 1998 
23:39:53 -0500
=>> I would like to define a CL structure (via a file format) and have it 
=>> define the subfields automatically(&fields).  That way if I change the 
=>> variable I change that portion of the structure.   With out having to  
=>> hard code like this; %SST(&STRUCTURE X Y) positions.  
=>>

>John, thank you for taking the time to point this out. I do see what you
>are refering to and I agree that this would very much be useful and
>helpful. 
  
=>> And not do logic control like this;    GOTO LABEL 
=>>  

>I sure can agree that this is the least favorite of ways to control
>program flow, although it is the most used. 

=>> John Carr

>I am not going to say that I see these enhancements to be as urgent as
>others might. But I sure do see that they are useful. I guess the next step
>would be to find out what item of lower priority IBM is assigning resources
>to, and petition for a change. Is there any idea?
>Chris Rehm
>Mr.AS400@ibm.net


Chris 
My point (as backed up by a show of hands at soundoff) is that 90% of the 
AS/400 shops use CL programs somewhere in their shops.  Either as 
application programs or as wrappers around other languages(like RPG, etc), 
or in System type programming to control the machine.   

These enhancements (that HAVE been petitioned for by COMMON members for 
15 YEAR's) would benefit nearly every AS/400 shop whether they are running
20 year old converted RPGII or are useing the AS/400 in completely brandnew
Web serving, DOMINO running, JAVA screaming machines that don't even have a
RPG compiler.

Everyone would benefit.

IBM has worked on lots of stuff(devoted resources to) that were dubious at
best in terms of customer benefit.   I'd be  willing to have traded the 
time & effort spent on RPG/370 (sorry Jon, I know those 2 customers really 
loved it) and have had the CL enhancements I just mentioned.  

--- structures in CL   by John Carr  Request # 1 ---------------------

---------- RPG CODE FOR BELOW CLP ------------------------------
D PARMDS      E  DS                   EXTNAME(FILEXXX)

                CALL   CLPPGM  
                PARM            PARMDS
---------------------------------------

PGM     &FILEXXX

DCLF    &FILEXXX   

CHGVAR  &XXXFIELDA      'SOMETHING'
CHGVAR  &XXXFIELDB      (&XXXFIELDB + 5)

ENDPGM

Now then, the parm(&FILEXXX) is a structure.  by declaring a file &FILEXXX
the compiler will declare all it's fields as 
variables(&XXXFIELDA, &XXXFIELDB,etc. ).  

I would also like the compiler to automatically declare a variable 
of the whole "format".  ie &FILEXXX.  Having the same as record length of 
FILEXXX.  When I change a subfield(&XXXFIELDA for example) it would 
automatically change the substring portion of &FILEXXX.   

Just like an externally defined data structure does in RPG.
 
Look at the above example code.  Imagine passing a structure(maybe an 
RPG externally D/S as a parm ?) to a CL program and not hard codeing like
this %SST(&FILEXXX 1 10).   NO HARDCODING OF SUBFIELDS WITHIN THE PARAMETER
STRUCTURE!.  Change the file, recompile, no touching of code. nice.

Imagine, passing a stucture instead of multiple parms would allow;

Never mis-defining parameter lengths in CL !!! 
Never mis-defining parameter types in CL !!!
Never mis-defining parameter sequences in CL !!! 

Never defining numeric fields(invoice #, Customer#, etc) as alpha 
because numerics are a pain as parms in CL !!!
(Note: defining the numerics in the file as zoned makes this work)

Just my opinion
John Carr
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact