Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Edit macro to comment the selected JCL statements

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
nbdtrjk1

New User


Joined: 19 Jan 2007
Posts: 3
Location: India

PostPosted: Fri Feb 23, 2007 11:22 am    Post subject: Edit macro to comment the selected JCL statements
Reply with quote

I want an edit macro to comment the selected JCL statements. Just take a look up below ex:

Input
Code:

//SYSPRINT DD  SYSOUT=*                             
//SYSUT1   DD  UNIT=SYSDA,SPACE=(1024,(50,20))     
//SYSLIB   DD  DSN=DBITS.DBA.PGMLIB,DISP=SHR       
//         DD  DSN=SYS1.SCEELKED,DISP=SHR           
//         DD  DSN=SYS1.TCPIP.SEZATCP,DISP=SHR     
//SYSLMOD  DD  DSN=&LOADLIB(&MEMBER),DISP=SHR       
//SYSLIN   DD  DSN=&&OBJECT,DISP=(OLD,DELETE)       
//         DD  DDNAME=SYSIN                         
//SYSIN    DD  DUMMY                               


Output:
Code:

//*SYSPRINT DD  SYSOUT=*                             
//*SYSUT1   DD  UNIT=SYSDA,SPACE=(1024,(50,20))     
//SYSLIB   DD  DSN=DBITS.DBA.PGMLIB,DISP=SHR       
//         DD  DSN=SYS1.SCEELKED,DISP=SHR           
//         DD  DSN=SYS1.TCPIP.SEZATCP,DISP=SHR     
//*SYSLMOD  DD  DSN=&LOADLIB(&MEMBER),DISP=SHR       
//SYSLIN   DD  DSN=&&OBJECT,DISP=(OLD,DELETE)       
//         DD  DDNAME=SYSIN                         
//*SYSIN    DD  DUMMY     
Back to top
View user's profile Send private message

UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 755
Location: Germany

PostPosted: Fri Feb 23, 2007 2:43 pm    Post subject:
Reply with quote

Hi !

I dont really know what you want to achieve with that, but if the words you want to change are allways the same, a EDIT-MACRO will do:

ISREDIT MACRO
ISREDIT C '//BlaBlaBla' '//* BlaBlaBla' all
ISREDIT C'//...next one & so on
ISREDIT RESET

Regards, UmeySan
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Fri Feb 23, 2007 2:52 pm    Post subject: Re: Line Macro
Reply with quote

I believe what is going to have to be done is that you'll have to enter the macro's name on the command line, move the cursor down to the line you want to comment, and the press ENTER to comment the line. Repeat the process for the next line, and so on.
Back to top
View user's profile Send private message
nbdtrjk1

New User


Joined: 19 Jan 2007
Posts: 3
Location: India

PostPosted: Fri Feb 23, 2007 3:30 pm    Post subject: Re: Edit macro to comment the selected JCL statements
Reply with quote

yes sir, I am working in Conversion project. I want to change lot jcls statements. that why i am looking for this tool.


My exact requirement is i'll place 'S' in the line command in the lot places in that member, after that i want to execute rexx macro. The output should comment all the seleted satements
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Feb 23, 2007 3:39 pm    Post subject:
Reply with quote

Take a look at the PROCESS command.

O.
Back to top
View user's profile Send private message
nbdtrjk1

New User


Joined: 19 Jan 2007
Posts: 3
Location: India

PostPosted: Fri Feb 23, 2007 5:17 pm    Post subject: Re: Edit macro to comment the selected JCL statements
Reply with quote

What is that PROCESS command?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 23, 2007 10:04 pm    Post subject:
Reply with quote

Hello,

Do you have access to the File-Aid product?

File-Aid has an option that lets you change a value across an entire pds - quite handy for JCL and program code.

If you search the forums, i believe a solution like what you want was posted in the last few weks - i just don't remember what it was called icon_confused.gif
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Sat Feb 24, 2007 1:01 am    Post subject: Re: Edit macro to comment the selected JCL statements
Reply with quote

nbdtrjk1, my apologies. I guess you can tell I don't get to write EDIT macros much. I had no idea that there was the PROCESS command, as ofer71 mentioned, that appears to do exactly what you asked for. Guess there's always the opportunity to learm something new. I'm going to have to play with it a bit, see what it can do.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sat Feb 24, 2007 8:08 pm    Post subject:
Reply with quote

I've used the PROCESS command to write an Edit-Macro which can comment almost any type of source code (JCL, COBOL, Assembler, panels, REXX, CLIST, SQL etc.). It starts with "MACRO NOPROCESS", then looks for CC CC or MM MM.

O.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Sun Feb 25, 2007 11:25 pm    Post subject: Re: Edit macro to comment the selected JCL statements
Reply with quote

This is a cut-down version of a macro that copes with many language 'types' (similar to the one mentioned above)...
Code:

/*REXX(CM)*/ TRACE "N"                                                 
xx = MSG("OFF")                                                         
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"                                 
ADDRESS ISREDIT                                                         
"MACRO (PARMS,DROP) NOPROCESS"                                         
"PROCESS RANGE S C "                                                   
range = SUBWORD(".ZF .ZL .ZFRANGE .ZLRANGE",1+(RC=0)*2,2)               
parms = STRIP(TRANSLATE(parms))                                         
PARSE VALUE 0 ABBREV("ON",parms,0) ABBREV("OFF",parms,2),               
            (ABBREV("ON",parms,0)|ABBREV("OFF",parms,2)),               
      WITH  RC on off valid                                             
IF( valid=0 )THEN                                                       
   CALL ABEXIT 1,"INVALID option",,                                     
                 "Option:" parms,                                       
                 "is invalid. CM allows option 'ON' or 'OFF' only"     
IF( on )THEN DO                                                         
   "X '//*' 1 ALL" range                                               
   "C '//' '//*' 1 ALL NX" range                                       
   "F P'='  1 ALL" range                                               
   END                                                                 
ELSE DO WHILE( RC=0 )                                                   
   "C '//*' '//' 1 ALL" range                                           
   END                                                                 
"SEEK P'=' 1 FIRST "                                                   
EXIT 1                                                                 
/*-abnormal exit-----------------------------------------------------*/
ABEXIT:                                                                 
PARSE ARG cc,zerrsm,zerrlm                                             
PARSE VALUE "YES NONE" WITH zerralrm zerrhm                             
ADDRESS ISPEXEC "SETMSG MSG(ISRZ002) "   
EXIT cc                                 
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Mass comment and edit elixir1986 IBM Tools 3 Thu Mar 02, 2017 10:09 pm
No new posts Reading selected volumes of a multi-v... RickBig JCL & VSAM 6 Wed Jul 13, 2016 7:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us