View previous topic :: View next topic |
Author |
Message |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Wed Sep 06, 2006 4:37 am Post subject: LINE_AFTER in a EDIT Macro! |
|
|
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 |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Wed Sep 06, 2006 6:58 am Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Sep 06, 2006 9:43 am Post subject: |
|
|
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 |
|
|
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Fri Sep 08, 2006 2:03 am Post subject: |
|
|
Ya got it.Thanks. |
|
Back to top |
|
|
sabarish Beginner
Joined: 13 Sep 2006 Posts: 7 Topics: 1
|
Posted: Mon Sep 25, 2006 5:02 am Post subject: |
|
|
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 |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Sep 25, 2006 5:46 am Post subject: |
|
|
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 |
|
|
|
|