View previous topic :: View next topic
|
Author |
Message |
subramaniabharathi
New User
Joined: 09 Mar 2006 Posts: 9
|
|
|
|
Hi,
Can anyone helpme in changing the comment line or message line in a dataset to data line
eg:
==MSG> -Warning- The UNDO command is not available until you change
this message line can be changed to data line using line command md
mdMSG> -Warning- The UNDO command is not available until you change
then the line will get changed to data line as
000001 -Warning- The UNDO command is not available until you change
now can anyone help me in running this line caommand using rexx.
(i.e) to detect all msg lines in rexx and change to data line |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Special lines can't be referred directly by edit macro. You can read more about it in the fine manual.
However, you can use the LOCATE SPECIAL command to locate the lines, and then use Doug Nadel's LMAC and UMAC examples to simulate the MD command. |
|
Back to top |
|
|
subramaniabharathi
New User
Joined: 09 Mar 2006 Posts: 9
|
|
|
|
Thank you so much ofer!
Lmac tool is good..
please tell me how to use for my purpose.I am sending you the code which I tried please correct me
I am getting the error LINEMAC not found and now whenever I open a dataset the command !LMAC is executed and says LMAC not foung.How to get rid of it.
/* REXX *******/
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('BH0002.LMAC.LOAD')"
"LIBDEF ISPPLIB"
CALL RESETLIB
INP1='BH0002.JCLS(DB2UNLD1)'
ADDRESS ISPEXEC "EDIT DATASET('"INP1"') MACRO(JEM) MACRO (LINE)"
RETURN
/****this is the line macro*******/
/********************Rexx******/
ADDRESS ISREDIT
"ISREDIT MACRO"
"ISREDIT (LAST) = LINENUM .ZLAST"
"ISREDIT (LIN,COL) = CURSOR"
DO WHILE LIN < LAST
"ISREDIT LOCATE SPECIAL"
"ISREDIT (LIN,COL) = CURSOR"
ADDRESS ISREDIT
ISREDIT !LMAC
"LINEMAC MACRO(MD) NO PROCESS"
END
I am editing a dataset first using a macro JEM which expands the job and set some text in the special lines like message and note.
Then I am executing a macro called line which finds the last line of the dataset.and changed all special line to data line till that
Thank you so much for ur help.
SubrahmaniyaBharathi |
|
Back to top |
|
|
|