IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

changing msg or comment line in dataset to dataline usg rexx


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subramaniabharathi

New User


Joined: 09 Mar 2006
Posts: 9

PostPosted: Tue Oct 03, 2006 2:06 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Oct 03, 2006 4:14 pm
Reply with quote

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
View user's profile Send private message
subramaniabharathi

New User


Joined: 09 Mar 2006
Posts: 9

PostPosted: Tue Oct 03, 2006 11:17 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top