Re: Reformat macro?
"John Larimer" <[email protected]>
| Newsgroups | gmane.comp.systems.as400.code |
|---|---|
| Message-ID | <[email protected]> |
Vern: Thanks for the clarification. I think I would still do it with recorded macros to be quick. Something like - start on the last line home position, cursor up, end, Alt-J, home (repeat)..... To split the lines, cursorpos 80, ctrl-left, Alt-S, down, home (repeat). I don't have a macro that does exactly what you want but Vincent Greene wrote a comments macro a while back that has a function for formatting a long string of text into comments. Maybe you could modify it for your purpose. Let me know if you want a copy. I think the tricky bit will be selecting the text you want to process. I never figured out how to just process text that is highlighted. Most of my macros process the entire file from the starting location or a single line at a time. John >From: Vern Hamberg <vhamberg-Ebbh53c6wcYkzXN11fiE55igCaZBIYHkAL8bYrjMMd8@public.gmane.org> >Reply-To: CODE/400 Discussion & Support <code400-l-Zwy7GipZuJhWk0Htik3J/[email protected]> >To: CODE/400 Discussion & Support <code400-l-Zwy7GipZuJhWk0Htik3J/[email protected]> >Subject: Re: Reformat macro? >Date: Fri, 20 Jun 2003 15:28:55 -0500 > >John, I wondered whether I'd been clear enough. > >I want to take the following > >:p.The CFGDSKHTR command is used to set >run-time control values for the STRDSKHTR >(referred to as the Monitor) and CHKDSKSPC >(referred to as the >Checker) commands. > >and have it reformatted to > >:p.The CFGDSKHTR command is used to set run-time control values for the >STRDSKHTR (referred to as the Monitor) and CHKDSKSPC (referred to as the >Checker) commands. > >This assumes an 80-character record, leaving a blank in position 80 - or >not, for UIM. > >BTW, :p. is a tag for a paragraph. > >I suppose it could concatenate the lines together with a blank between >each, then substring to word breaks. Actually, REXX could handle that >pretty well. I think, with its WORDS() and WORD() functions. Then put the >new lines back where the original ones were. > >Does that make more sense? > >Thanks > >Vern > >At 12:03 PM 6/20/2003 -0700, you wrote: >>Vern: >> >>I'm not picturing in my mind exactly what you are asking for but maybe >>this will help. >> >>It sounds like you want to position your cursor to a column (editor >>command cursorpos xx), go to the previous word (shift-left arrow) and >>split the line (Alt-S). >> >> >>>From: Vern Hamberg <vhamberg-Ebbh53c6wcYkzXN11fiE55igCaZBIYHkAL8bYrjMMd8@public.gmane.org> >>>Reply-To: CODE/400 Discussion & Support <code400-l-Zwy7GipZuJhWk0Htik3J/[email protected]> >>>To: code400-l-Zwy7GipZuJhWk0Htik3J/[email protected] >>>Subject: Reformat macro? >>>Date: Fri, 20 Jun 2003 11:42:46 -0500 >>> >>>Y'all >>> >>>Is there a macro or built-in function that will reformat source lines? I >>>need it for editing UIM help. I want to avoid a lot of manual steps using >>>ALT-S and ALT-J and keeping track of record length. >>> >>>It'd need to break the selected lines at word breaks. >>> >>>I can do this easily in TextPad. Probably other editors can, too. >>> >>>TIA >>> >>>Vern > > >_______________________________________________ >This is the CODE/400 Discussion & Support (CODE400-L) mailing list >To post a message email: CODE400-L-Zwy7GipZuJhWk0Htik3J/[email protected] >To subscribe, unsubscribe, or change list options, >visit: http://lists.midrange.com/mailman/listinfo/code400-l >or email: CODE400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected] >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 > _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ This is the CODE/400 Discussion & Support (CODE400-L) mailing list To post a message email: CODE400-L-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/code400-l or email: CODE400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected] 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