|
Here's a simple CL program:
pgm
dcl &uint *uint
dcl &int *int
chgvar &int ( 0 )
dofor &uint from( 1 ) to( 10 )
select
when ( &uint *eq 1 ) +
dmpclpgm
when ( &uint *eq 10 ) +
dmpclpgm
otherwise +
chgvar &int &uint
endselect
enddo
return
endpgm
Rather pointless except that it uses various fancy things that IBM
made available in V5R3... _and_ it compiles back to and runs on V5R2!
How? By compiling it on our *V5R4* system with TGTRLS(V5R2M0). Simple.
While looking for something (which I promptly forgot about), I
noticed that the QSYSV5R2M0 library on one of our V5R3 machines was
different from the library on our V5R4 system. Wondering if the
implication held up, I threw together the above, made sure it
'worked' on V5R4, recompiled back to V5R2, FTPd it via savefile to
one of our V5R2 systems, restored... and Voila! It worked.
Nothing earth-shattering, I know. But when you have a bunch of
systems that you'd like to manage with general control procedures,
this can make a very nice difference.
Am I just now learning something the world has known for years?
(Wouldn't be the first time.) This is 'normal' for V5R2, right?
I've often thought that CL "internal" commands such as DO, SELECT,
DCL, etc., that are only valid in compiled programs should be easier
to create back-level, but I never really expected to see it.
Tom Liotta
--
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone 253-872-7788 x313
253-479-1416
Fax 253-872-7904
http://www.powertech.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.