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





The standard macros supplied with the product are in an Extras subdirectory. Enable the extra macros by entering the command 'EXTRAS ON'.

You could also enter the command 'EXTRAS ON C:\usrmacros' were C:\usrmacros is the name of a directory that you keep your custom macros in. You can add additional directories seperated by a semi-colon just like on a path statement.

You can verify the path searched for macros by entering the command 'query lpath'.

What follows is a macro I have launched with every file load (I modified PROFSYS.LXU). It adds an actionbar item called Macros and places every macro found (from your lpath, files ending in .lx) on the menu as both a Run and View option.

This helps solve the problem of knowing what is available and you can use the view option for documentation.

You might have to adjust some of the longer lines.




/*********************************************************************/ /* */ /* PGM NAME - load_toolbar_macros.lx */ /* PROGRAM TITLE - Load Macros onto the ActionBar */ /* DATE WRITTEN - 08/23/99 */ /* AUTHOR - John Larimer */ /* NARRATIVE - This macro queries lpath to determine the path */ /* of your macros. It will then add each macro */ /* found to the actionbar so they can be quickly */ /* launched or opened for viewing. */ /* */ /*********************************************************************/ /* */ /* MODIFIED PGMR DESCRIPTION */ /* ~~~~~~~~ ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* 12/17/02 JKL Updated for WDSC v4 */ /* 01/10/03 JKL Added check for OS */ /* 01/30/03 JKL Macros that end in '+' have parms */ /* -------------------------------------------------------------- */ /*********************************************************************/

/* Initial Setup for Windows Version */
call RxFuncAdd 'SysWinVer', 'REXXUTIL', 'SysWinVer'
OSver = SysWinVer()

select
 when substr(OSver,1,9) = "WindowsNT" then do
   SubPos = 40
 end /* do */

 when substr(OSver,1,9) = "Windows95" then do
   SubPos = 45
 end /* do */
 otherwise
   SubPos = 40 /* might be wrong */
end /* select */




/* Initial setup for output file */


 cmdstr = 'del c:\UsrMacros\Tmp\alphawrd.txt'
 address cmd cmdstr
 output=.stream~new('c:\UsrMacros\Tmp\alphawrd.txt')
 output~open('replace')

'extract lpath' into query /* ID that path that the macros are found in */

do until test = 0 /* strip out the ; between each directory */
test = query~pos(';')
if test <> 0 then query = query~overlay(' ',test)
end


test = query~words /* find how many directories to search */

   do i = 1 to test by 1
     word.i = query~word(i)    /* pulls the directory */

     cmdstr = 'del' word.i || '\maclist.txt'
     address cmd cmdstr                       /* delete work file */
     cmdstr = 'dir' word.i || '\*.lx >>' word.i || '\maclist.txt'
     address cmd cmdstr                       /* writes work file */
   end

count=0

do i = 1 to test by 1

file=.stream~new(word.i || '\maclist.txt')

do while file~lines<>0
text=file~linein /* read the maclist file for input */
count=count+1
macro.count = text~substr(SubPos)
macroname = macro.count
PARSE UPPER VAR macro.count UPPERMACRO
test = uppermacro~lastpos('.LX') /* see if line has a .lx entry */


           if test <> 0 then do
             shortword = uppermacro~overlay('   ',test)
             shortword = shortword~strip

do until test = 0 /* make sure there are '_' in place of spaces */
test = shortword~pos(' ')
if test <> 0 then shortword = shortword~overlay('_',test)
end



firstchar = uppermacro~substr(1,1) if firstchar<"A" | firstchar>"Z" then alphaword = shortword~substr(2) else alphaword = shortword

textout = alphaword word.i shortword macroname /* create the output string */

            output~lineout(textout)    /* output what we found */
          end
       end
   end

output~close

call sortfile /* sort the records */

input=.stream~new('c:\UsrMacros\Tmp\sorted.txt')
do while input~lines<>0
text=input~linein /* read the sorted records */
PARSE UPPER VAR text word1 word2 word3 word4


     firstchar = word1~substr(1,1)
       select
         when firstchar <  'A' then sort = firstchar
         when firstchar <= 'B' then sort = 'A_-_B'
         when firstchar <= 'D' then sort = 'C_-_D'
         when firstchar <= 'F' then sort = 'E_-_F'
         when firstchar <= 'H' then sort = 'G_-_H'
         when firstchar <= 'J' then sort = 'I_-_J'
         when firstchar <= 'L' then sort = 'K_-_L'
         when firstchar <= 'N' then sort = 'M_-_N'
         when firstchar <= 'P' then sort = 'O_-_P'
         when firstchar <= 'R' then sort = 'Q_-_R'
         when firstchar <= 'T' then sort = 'S_-_T'
         when firstchar <= 'V' then sort = 'U_-_V'
         when firstchar <= 'X' then sort = 'W_-_X'
         when firstchar <= 'Z' then sort = 'Y_-_Z'
       otherwise
         sort = firstchar
       end

       location = word2~changestr('\', ' ')
       numwords = location~words
       location = location~word(numwords)

       Select
       when location = 'EXTRAS'    then location = '____-____EXTRA'
       when location = 'MACROS'    then location = '____-____IBM'
       when location = 'USRMACROS' then location = '____-____USER'
       otherwise
       location = '____-____' || location
       end /* Select */


last_char = substr(word3,(length(word3)),1) /* get last character, if a '+', set up for parms */
if last_char = '+' then do
'set actionbar.Macros.Run.' || sort || '.' || word3 || '.All macro' word3 'ALL'
'set actionbar.Macros.Run.' || sort || '.' || word3 || '.Once macro' word3 'ONCE'
'set actionbar.Macros.Run.' || sort || '.' || word3 || '.(no_Parm) macro' word3
end
else do
'set actionbar.Macros.Run.' || sort || '.' || word3 || '_' || location 'macro' word3 /* no parms */
end
'set actionbar.Macros.View.' || sort || '.' || word3 || '_' || location 'start codebrws' word2 ||'\' || word4
end


input~close
address cmd 'del c:\UsrMacros\Tmp\sorted.txt'
/* msg 'View option has been added to Macros on the ActionBar above. Select Macros | View to use.' */
msg ''
exit


sortfile: procedure
address cmd 'sort c:\UsrMacros\Tmp\alphawrd.txt > c:\UsrMacros\Tmp\sorted.txt'
address cmd 'del c:\UsrMacros\Tmp\alphawrd.txt'
return




Good Luck,

John



From: "Bartell, Aaron L. (TC)" <ALBartell@xxxxxxxxxxxxxx>
Reply-To: CODE/400 Discussion & Support <code400-l@xxxxxxxxxxxx>
To: "'CODE/400 Discussion & Support'" <code400-l@xxxxxxxxxxxx>
Subject: RE: Why should I use CODE/400?
Date: Tue, 18 Feb 2003 15:57:59 -0600

What types of macros do you use that improve your productivity.  I haven't
used macros yet, but I would like to get my feet wet.

Aaron Bartell

-----Original Message-----
From: John Larimer [mailto:jklarimer@xxxxxxxxxxx]
Sent: Tuesday, February 18, 2003 3:43 PM
To: CODE/400 Discussion & Support
Subject: Re: Why should I use CODE/400?




I like the powerful macro capability. I feel it really improves my productivity.

John

----- Original Message -----
From: <fkany@xxxxxxxxxxxxxxxxxx>
To: <code400-l@xxxxxxxxxxxx>
Sent: Tuesday, February 18, 2003 1:15 PM
Subject: Why should I use CODE/400?


> I've been using CODE/400 for about a week. Why should I use CODE/400 > instead of SEU to edit source code? What are some of the major PRO's? > CONS? > > _______________________________________________ > 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 > > _______________________________________________ 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
_______________________________________________
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 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.