Hi
you can run all of the editor commands as what are called Edit macros, which
are scripts. There is a whole manual dedicated to edit and edit macros. For
example this macro checks for EXEC SQL calls, then puts a variable on the
profile pool to indicate thus:
/* REXX */
"ISREDIT MACRO"
SCLMSQL = '0'
/* Check for SQL calls */
"ISREDIT Find 'EXEC SQL' First"
Do While (RC = 0)
SCLMSQL = '1'
"ISREDIT (Line,Col) = CURSOR"
"ISREDIT LABEL "Line" = .a"
"ISREDIT Find '*' 7 .a .a all"
If RC <> 0 Then Leave
"ISREDIT CURSOR = "Line Col
"ISREDIT Find 'EXEC SQL' Next"
End
Address ISPEXEC "VPUT (SCLMSQL) PROFILE"
"ISREDIT END"
You can then run these macro while you are in the member, or from some
REXX that invokes the Edit service. For example this REXX loops through all
members in a library invoking a macro against each member that does some
tailoring:
/* rexx */
Arg dataset macro
If dataset = '' Then dataset = "'ADMIN10.DEV1.SOURCE'"
If macro = '' Then macro = "MACRO1"
MEMBER = ''
Address ISPEXEC "LMINIT DATAID(DID) DATASET("dataset") ENQ(SHR)"
Address ISPEXEC "LMOPEN DATAID("DID") OPTION(INPUT)"
Address ISPEXEC "LMMLIST DATAID("DID") OPTION(LIST) MEMBER
(MEMBER)"
Do while (RC = 0)
Say 'Processing member' member
Address ISPEXEC "EDIT DATAID("DID") MEMBER("MEMBER") MACRO
("MACRO")"
Address ISPEXEC "LMMLIST DATAID("DID") OPTION(LIST) MEMBER
(MEMBER)"
End
Address ISPEXEC "LMCLOSE DATAID("DID")"
Address ISPEXEC "LMFREE DATAID("DID")"
Return
Cheers
Liam
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html