|
On 4/10/2015 4:25 AM, Paul Bailey wrote:
Does anyone have any ideas that could make RDi user's lives easier that might be possible using an Eclipse script?
I just wrote a Rexx macro for Code/400 to automate something that will
make my life easier. I have a very old application that has a few dozen
RPG programs creating work files from various mater files and
transaction files in order to create more work files and it's quite a
mess. I don't have a dedicated test environment so I need to make one.
Generally speaking, I'll CPYF from production to the test library and
off I'll go. How do I know what files I need? They're in the
F-specifications.
So I wrote a quick Rexx macro that reads the F-specs and creates CPYF
commands out of them. Because I can't do it inEclipse, I need to
copy/paste between RDi and Code, but it was so easy to write the Rexx
script that I'll take that pain. This is a quick, quick hack. No error
checking or anything. Took 5 minutes.
The point isn't to make my life easier with RDi per se, but to command
the editor to do things I might otherwise use awk and sed to do.
/* Convert F spec to CPYF */
fromlib = "production"
tolib = "buck00001"
/* how many lines? */
'extract elements'
/* move to first line */
top
i = 0
do until i >= elements
/* read the line */
'extract content'
/* file name */
filename = substr(content, 7, 8)
'insert cpyf 'fromlib'/'filename' 'tolib'/'filename' mbropt(*replace)'
/* delete the F spec and move to the next one, skipping over the cpyf */
i = i + 1
'prev'
'delete'
'next'
end
--
--buck
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-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.