MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » February 2014

RE: manipulating parms



fixed

A simple character transposition ...

pgm parm(&inparm)
dcl &inparm *char 10
DCL &UPPER *CHAR 36 '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
DCL &LOWER *CHAR 36 '0123456789abcdefghijklmnopqrstuvwxyz'
dcl &sst1 *DEC (2 0) value(1) /* exclude first character */
dcl &sst2 *DEC (2 0) value(0)

A010: chgvar &sst1 (&sst1 + 1)
if (&sst1 *le 10) +
then(do)
chgvar &sst2 0
A020: chgvar &sst2 (&sst2 + 1)
if (&sst2 *le 36) +
then(do)
if (%sst(&inparm &sst1 1) *eq %sst(&upper &sst2
1)) +
then(do)
chgvar %sst(&inparm &sst1 1) %sst(&lower
&sst2 1)
goto a010
enddo
goto a020
enddo
goto a010
enddo

I've coded this without the help of the cl syntax checker so there are
probably a couple of whoopsies ...

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of jmurfitt@xxxxxxxxxx
Sent: 12 February 2014 16:17
To: MIDRANGE-L@xxxxxxxxxxxx
Subject: Re: manipulating parms

Hi All,

I need an easy way to convert parms passed by a CL program from ALL
uppercase to mixed? Keep 2 things in mind, I am not a programmer although I
can write simple programs and also this is an example of what I need to do.
Convert PARMS26 to Parms26.

Thanks,

Joe Murfitt
--
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.







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