MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LINE_AFTER in a EDIT Macro!

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
sendhil
Beginner


Joined: 06 Sep 2006
Posts: 17
Topics: 6

PostPosted: Wed Sep 06, 2006 4:37 am    Post subject: LINE_AFTER in a EDIT Macro! Reply with quote

Hi,
I am trying to paste a set of lines in a PS file using a EDIT MACRO.
The Macro takes line command input.So u can mention either a/b (after/Before) which line u need to paste teh set of lines.

But LINE_AFTER command allows only single line to be pasted at a time.
I need to paste a set of lines ,that are there in the stem variable.Is there any other command to do it?

Is there a way to set the CLIPBOARD through REXX? and Use teh inbuilt Paste command to achieve the above mentioned task?

Regards
senDhil.
Back to top
View user's profile Send private message Send e-mail
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Wed Sep 06, 2006 6:58 am    Post subject: Reply with quote

You can use the COPY & PASTE commands from Edit-Macro written in REXX. You can even use clipboards.

Here is an example of inserting multiple lines using LINE_AFTER:
Code:
/*------------------------------- REXX ------------------------------- 
 * PROGRAM   : JBOX                                                     
 * FUNCTION  : DRAW A COMMENT BOX IN JCL.                               
 * AUTHOR    : OFER                                                     
 * DATE      : 18/06/03                                                 
 * HOW TO USE: Use 'A' (after) or 'B' (before).                         
 *           :                                                         
 *------------------------------------------------------------------*/ 
                                                                       
ADDRESS ISREDIT "MACRO (DEPTH) NOPROCESS"                               
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"                                 
ADDRESS ISREDIT "PROCESS DEST"                                         
                                                                       
IF ? DATATYPE(DEPTH,'W') THEN                                           
  DEPTH = 7                                                             
                                                                       
FULLLINE  = "//*"||COPIES('*',69)                                       
BLNKLINE  = "//*"||COPIES(' ',68)||"*"                                 
                                                                       
ADDRESS ISREDIT "(DESTLN) = LINENUM .ZDEST"                             
CURS = DESTLN + 2                                                       
                                                                       
ADDRESS ISREDIT "LINE_AFTER &DESTLN = (FULLLINE)"                       
DO DEPTH - 2                                                           
  ADDRESS ISREDIT "LINE_AFTER &DESTLN = (BLNKLINE)"                     
END                                                                     
ADDRESS ISREDIT "LINE_AFTER &DESTLN = (FULLLINE)"                       
                                                                       
ADDRESS ISREDIT "CURSOR = &CURS 5"                                     
                                                                       
EXIT                                                                   
                                                                       


O.
________
volcano vaporizers


Last edited by ofer71 on Sat Feb 05, 2011 11:47 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Sep 06, 2006 9:43 am    Post subject: Reply with quote

A common technique is to use LINE_BEFORE on the following line (add one if you need to) or to simply use line_after in the bottom to top order.
Back to top
View user's profile Send private message Visit poster's website
sendhil
Beginner


Joined: 06 Sep 2006
Posts: 17
Topics: 6

PostPosted: Fri Sep 08, 2006 2:03 am    Post subject: Reply with quote

Ya got it.Thanks.
Back to top
View user's profile Send private message Send e-mail
sabarish
Beginner


Joined: 13 Sep 2006
Posts: 7
Topics: 1

PostPosted: Mon Sep 25, 2006 5:02 am    Post subject: Reply with quote

Hi

As i am a novice to ISPF programming ,how can i try running the piece of code given by ofer above. I wrote the code given above.

But how should i create 'DEPTH' 'DEST' etc and how to use the line commands 'A' and 'B' with this macro?

Thanks in advance.

Regards
Sabarish
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Sep 25, 2006 5:46 am    Post subject: Reply with quote

Save it in a PDS allocated to your SYSEXEC concatenation. Save it under a name (lets say JBOX).

Go into ISPF editor, mark the desired line with A or B, and enter the jommand JBOX in the command line.

DEST is simply the line before or after the line you have marked.

DEPTH is an optional parameter for the depth of the box (for example: JBOX 20).

Since this is an Edit-Macro, you run it without the preceding EXEC command.

O.
________
buy grinders
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group