× 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.



Don:

I like to have macros do the formatting for me. I use the macro below to convert MOVEs to EVAL. This example is fixed format but converting to free should be a fairly simple change.

Over time, I've built similar macros for converting Z-ADDs and for other RPGIV formatting tasks.

When assigned to a keystroke, I find it much faster than cut and paste.

John


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* MACRO NAME - move_to_eval.lx */
/* PROGRAM TITLE - Convert from move to eval */
/* DATE WRITTEN - 01/30/03 */
/* AUTHOR - John Larimer */
/* NARRATIVE - Reads source file and converts classic opcodes MOVEx */
/* to mixed case extended factor 2 opcodes. Good */
/* RPGIV only. */
/* PARMS - none */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* MODIFIED LOG # PGMR DESCRIPTION */
/* -------- ----- ---- ------------------------------------------------ */
/* 01/30/03 JKL Original Version */
/* ----------------------------------------------------------------------- */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


 extract 'content'     /* get contents of the line */
 text = content        /* move contents into variable named text */
 text = text~translate /* force upper */

 Factor1 = space(substr(text,12,10))
 Factor2 = space(substr(text,36,10))
 Result = space(substr(text,50,10))
 Output = content
 processed = 'Y'      /* default = 'Y' */
 opcode = space(substr(text,26,10))

 select
   when opcode = 'MOVE ' then
   call opmove

   when opcode = 'MOVEL' then
   call opmovel

   when opcode = 'MOVEL(P)' then
   call opmovel

 otherwise
   processed = 'N'
 end /*Select*/



 if processed = 'Y' then do
   'set content' (output)
 end
 next element
exit


/* *********************************************************************** */
/* Subroutines */
/* *********************************************************************** */


opmove: /* Subroutine */
output = overlay('Eval',output,26)
output = overlay(Result ' = ' Factor2, output, 36,40)
return

opmovel: /* Subroutine */
output = overlay('Eval     ',output,26)
output = overlay(Result ' = ' Factor2, output, 36,40)
return



From: "Don Freeman" <DFreeman@xxxxxxxxxxxxxxx>
Reply-To: CODE/400 Discussion & Support <code400-l@xxxxxxxxxxxx>
To: "CODE/400 Discussion & Support" <code400-l@xxxxxxxxxxxx>
Subject: RE: Code Learning Tools
Date: Thu, 14 Aug 2003 10:38:42 -0700

I know that there is one thing that I have to use SEU for but it is pretty minor. It comes in handy when converting MOVE statements to EVAL statements in Free-Form. I can cut out a rectangular area in SEU so that I can move it to the other side of the '=' operator, and if there are pages of contiguous MOVE statements (and there frequently are) it's a real time saver. I can not do this in CODE due to the way the Window's selection works. Other then that I would never go back to SEU except maybe for quick browsing.

> -----Original Message-----
> From: Buck [mailto:buck.calabro@xxxxxxxxxxxx]
> Sent: Thursday, August 14, 2003 10:22 AM
> To: code400-l@xxxxxxxxxxxx
> Subject: Re: Code Learning Tools
>
>
> My only advice is to abandon the SEU mindset.  That is, when
> using Code,
> don't try to do the same tasks the same as you would have in
> SEU.  If you
> get really stuck trying to do something in Code and
> absolutely have to do it
> NOW, try SEU mode.  Options, Key Behaviour, SEU.  At least
> you won't have to
> close Code and open SEU...
>
> This is a fairly low traffic list, so I think we'll get some
> leeway when it
> comes to non-technical postings.  Could you describe one of
> the things you
> couldn't get done in Code that you manage with SEU?
>   --buck
>

_______________________________________________
This is the CODE/400 Discussion & Support (CODE400-L) mailing list
To post a message email: CODE400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/code400-l
or email: CODE400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/code400-l.

NOTE: WDSc for iSeries disucssion has it's own mailing list.
Information can be found at http://lists.midrange.com/cgi-bin/listinfo/wdsc-l



_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.