Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Find and replace tacl macro.

1,042 views
Skip to first unread message

Shiva

unread,
Feb 4, 2014, 1:02:08 PM2/4/14
to
Say I need a macro that will do this.

In tacl prompt I type:

RUN MACRO FILENAME

And within the macro I've to define the words which need to be found and replaced with some other words.
Like say, if inside the file there's a word called "Shiva" written 'n' number of times, it needs to be changed to "Sam" n number of times. Not just one find and replace text - two or three, basically many. Like "Keith" to "Robin". And "Randall" to "Max". The length of the characters may differ. The file is of type 101. Also, I'd like to add that usually when you find and replace it will not go beyond 132 characters so you need not worry about that coherency.

Is there a way to do it? If so, can you please let me in on it?

Doug Miller

unread,
Feb 4, 2014, 2:02:32 PM2/4/14
to
Shiva <subrama...@gmail.com> wrote in
news:5ecf1339-0d13-41e7...@googlegroups.com:

> Say I need a macro that will do this.
>
> In tacl prompt I type:
>
> RUN MACRO FILENAME

Use a ROUTINE instead of a MACRO -- there is an excellent argument-parsing tool called
#ARGUMENT which is available in ROUTINEs but not in MACROs.

> And within the macro I've to define the words which need to be
> found and replaced with some other words. Like say, if inside
> the file there's a word called "Shiva" written 'n' number of
> times, it needs to be changed to "Sam" n number of times. Not
> just one find and replace text - two or three, basically many.
> Like "Keith" to "Robin". And "Randall" to "Max". The length of
> the characters may differ. The file is of type 101. Also, I'd
> like to add that usually when you find and replace it will not
> go beyond 132 characters so you need not worry about that
> coherency.
>
> Is there a way to do it? If so, can you please let me in on it?

Sure. Your TACL routine should:
- have a list of word pairs specifying what should be replaced with what
- start EDIT as an INLINE process
- scan down the line of word pairs, building an EDIT CHANGE command for each pair and
feeding that command to the EDIT process
- shut down EDIT when at end of list




If you want to write that yourself, stop reading this post right here.
.
.
.
.
.
I warned you.
.
.
.
.
?TACL ROUTINE
==
== CAUTION: written off the top of my head 5 minutes ago; UNTESTED
==
#FRAME
#PUSH #INLINEPROCESS, #INLINEPREFIX
#PUSH edit^command, string1, string2, filename
== this is the reason for using ROUTINE instead of MACRO:
== ROUTINE allows use of #ARGUMENT, MACRO doesn't.
== Command below verifies that argument supplied is both a valid filename,
== *and* is the name of an existing file.
SINK [#ARGUMENT /VALUE filename/ FILENAME]

== Without & at the end of the #DEF command, the first line of the variable would be empty.
[#DEF replace^list TEXT |BODY|&
Shiva Sam
Keith Robin
Randall Max
]
INLPREFIX **
EDIT /INLINE/
** G [filename]
[#LOOP |WHILE| NOT [#EMPTYV replace^list] |DO|
#SETMANY string1 string2, [#EXTRACT replace^list]
** CQWA/[string1]/[string2]/A
== Edit command parsed:
== C = change
== Q = Quiet (don't echo changes to terminal)
== W = Whole word (e.g. 'Sam' matches 'Sam' but not 'Samuel')
== A = All occurrences (if string occurs multiple times on one line, change all of them;
== without this, only the first occurrence on a line is changed)
== /string1/string2/ tells Edit to change string1 to string2
== A = All (apply command to all lines in file)
==
] == end Loop
INLEOF
#UNFRAME

Shiva

unread,
Feb 4, 2014, 2:27:47 PM2/4/14
to
Quick question. Difference between a routine & a macro?

Shiva

unread,
Feb 4, 2014, 2:32:42 PM2/4/14
to
Just read through your code, Doug. Wow that's so cool! You can do so many things with tacl!? It is indeed a very powerful language! And all that with so short a code. Impressive. And cool! Hope it works, I'll check it and let you know tomorrow. :)

Shiva

unread,
Feb 4, 2014, 2:33:27 PM2/4/14
to
And thanks for all those comments. Very, very useful. More than you can imagine. Thanks again.

Doug Miller

unread,
Feb 4, 2014, 4:06:13 PM2/4/14
to
Shiva <subrama...@gmail.com> wrote in news:28c1e9bb-c685-4cf8-a0d6-
8a1239...@googlegroups.com:

> Quick question. Difference between a routine & a macro?

ROUTINE offers much more powerful parameter parsing. MACRO accepts a positional list
of parameters, but if you want to check them for validity you have to write the code yourself.
#ARGUMENT, accessible only inside a ROUTINE, allows complex and sophisticated type
and value checking on all parameters.

ROUTINE allows exception handlers as well. MACRO does not.

ROUTINE allows conditional exits, MACRO does not.

ROUTINE has a return value, MACRO does not. That is, you can set the value of a variable
to the return value of a ROUTINE: #SET var [routine_name param1 param2] but you can't
do that with a MACRO.

Back when I was doing that stuff for a living, I very rarely wrote MACROs. Almost everything I
did was ROUTINEs.

Robert Hutchings

unread,
Feb 4, 2014, 4:46:57 PM2/4/14
to
I'm curious, would it be easier to use grep (or some variation of grep) from the OSS space to do this?

Robert Hutchings

unread,
Feb 4, 2014, 5:36:26 PM2/4/14
to
For example, from the OSH shell...

u@nix> grep -rl oldstr path | xargs sed -i 's/oldstr/newstr/g' /dev/null

Doug Miller

unread,
Feb 4, 2014, 6:00:02 PM2/4/14
to
Robert Hutchings <rm.hut...@gmail.com> wrote in news:4693d7f3-f4d3-468e-9bba-
75fc33...@googlegroups.com:

> For example, from the OSH shell...
>
> u@nix> grep -rl oldstr path | xargs sed -i 's/oldstr/newstr/g' /dev/null

Well, sure -- but he has a *list* of oldstrings and newstrings, and apparently wants to avoid
running the same command over and over for each pair.

If that's not part of the equation, it's easy enough to do in the Guardian environment too:

EDIT
G filename
CQWA/oldstring1/newstring1/A
CQWA/oldstring2/newstring2/A
CQWA/oldstring3/newstring3/A
...
but I think that's what Shiva wanted to avoid.

@Shiva:
You can also load your strings into a file, then (in the code that I wrote) replace

[#DEF replace^strings {or whatever I called it} TEXT |BODY|&
...
]

with

#PUSH replace^strings
#SET /IN <file where the strings are stored>/ replace^strings

Robert Hutchings

unread,
Feb 4, 2014, 6:20:03 PM2/4/14
to
Yeah, maybe your TACL code is more straightforward than a *nix shell script. When I was the TACL guru at a couple of my gigs I used #argument all the time and I used the [#def do^something ROUTINE |BODY| --- in all my code.

Randall

unread,
Feb 4, 2014, 6:47:14 PM2/4/14
to
On Tuesday, February 4, 2014 6:20:03 PM UTC-5, Robert Hutchings wrote:
> Yeah, maybe your TACL code is more straightforward than a *nix shell script. When I was the TACL guru at a couple of my gigs I used #argument all the time and I used the [#def do^something ROUTINE |BODY| --- in all my code.

Just an optimization suggestion. If the search/replace strings are different sizes, do two p! commands at the end to really compress the file. It will reorganize the file and cause subsequent reads to be faster if the file is being repeatedly read.

Doug Miller

unread,
Feb 4, 2014, 7:25:32 PM2/4/14
to
Randall <rsbe...@nexbridge.com> wrote in
news:2441473f-a400-4d41...@googlegroups.com:
Good point.

@Shiva: just before the INLEOF command, insert this line:
** p!;p!

Keith Dick

unread,
Feb 5, 2014, 7:12:48 AM2/5/14
to
I agree that routines have many advantages. However, it is not quite the case that you cannot get a result from a macro.

[#set var [macro_name param1 param2]]

will set var to the value the last line of the macro expands to. Just as a example for illustration,

[#def macro_name macro |body|
[#fileinfo/%1%/%2%]
]

would work, expanding to whatever attribute name you pass in the first argument of the filename passed as the second argument. For example:

[#set var [macro_name subvol $a.b.c]]

would set var to "b".

There really is no advantage to making a macro out of that one line, but more complex macros are possible, and the result of the macro is whatever its last line expands to. For quick problem solving, where you don't intend to have the macro be used widely, it is a little easier not to have to write the #argument processing, so using a macro has its place. Whenever checking arguments is needed, or for other things Doug mentioned, routines certainly are better.

Shiva

unread,
Feb 5, 2014, 2:03:33 PM2/5/14
to
@Doug: Thanks for all those explanation! Impressed. Though I didn't understand some of the point, I pretty much got it. :)

And to your later comment about

> f that's not part of the equation, it's easy enough to do in the Guardian environment too:
>
> EDIT
> G filename
> CQWA/oldstring1/newstring1/A
> CQWA/oldstring2/newstring2/A
> CQWA/oldstring3/newstring3/A
> ...
> but I think that's what Shiva wanted to avoid.

I've read this somewhere, but can't recall where. And yes, you're right Doug, this is a lot tedious than what I was expecting to do. But what does CQWA mean? And why do I have to give EDIT, G <Filename>? This is a osh command?

And thanks for all the updates on the codes which you kept posting. Will get back to you on how it works out!

@Randall: What's grep? A OSH command I believe? A command to replace?

@Keith: Insightful as ever. I'd have to learn the advantages of both macros and routines. Thanks! :)

Keith Dick

unread,
Feb 5, 2014, 2:56:13 PM2/5/14
to
Shiva wrote:
> @Doug: Thanks for all those explanation! Impressed. Though I didn't understand some of the point, I pretty much got it. :)
>
> And to your later comment about
>
>
>>f that's not part of the equation, it's easy enough to do in the Guardian environment too:
>>
>>EDIT
>>G filename
>>CQWA/oldstring1/newstring1/A
>>CQWA/oldstring2/newstring2/A
>>CQWA/oldstring3/newstring3/A
>>...
>>but I think that's what Shiva wanted to avoid.
>
>
> I've read this somewhere, but can't recall where. And yes, you're right Doug, this is a lot tedious than what I was expecting to do. But what does CQWA mean? And why do I have to give EDIT, G <Filename>? This is a osh command?

CQWA is an abbreviation for the command + options: CHANGE QUIET WORD ALL
QUIET says don't display the changed line. WORD says only match oldstring1 if the matching text is a whole word, not a partial word (prevents /nt/ from matching the word "constant" and so changing the "nt" part to whatever is in the second part of the substitution). ALL means change all occurences on the line, not just the first. The A at the end of the command is also an abbreviation for ALL, but that is the line range and means to try the change on all lines of the file.

EDIT is different than TEDIT. Both are Guardian programs that edit NonStop Edit files, but EDIT is a line mode editor with a page mode add-on while TEDIT is a page mode editor with a line mode add-on. The program and manual I mentioned in the other thread is EDIT, not TEDIT.

The G command stands for GET and is the way you open a file to be edited or the way you copy lines from another file to insert into the file you currently are editing.
>
> And thanks for all the updates on the codes which you kept posting. Will get back to you on how it works out!
>
> @Randall: What's grep? A OSH command I believe? A command to replace?

grep is a standard Unix command that searches for string matches. The command that Robert suggested was:

grep -rl oldstr path | xargs sed -i 's/oldstr/newstr/g' /dev/null

This tells grep to list the names of the files that contain a match of "oldstr" and sends that list to the xarg command, which runs the sed editor on each file, telling it to replace oldstr with newstr. I'm not sure why the /dev/null is there.

Doug Miller

unread,
Feb 5, 2014, 2:58:25 PM2/5/14
to
Shiva <subrama...@gmail.com> wrote in
news:171ba61c-d081-4ea6...@googlegroups.com:


> you're right Doug, this is a lot tedious than what I was
> expecting to do. But what does CQWA mean?

CQWA is an Edit command: Change Quiet Word All. Explanation in the
comments in the TACL code I posted. Detailed explanation in the
Edit Manual. :-)

>And why do I have to give EDIT, G <Filename>? This is a osh
>command?

No, it's a Guardian command. EDIT launches the EDIT program (*not*
T-Edit); G is an abbreviation for GET, which is the instruction to
open <filename>.


wbreidbach

unread,
Feb 5, 2014, 3:58:41 PM2/5/14
to
Just let me add one thing: As far as I know EDIT does not need a blockmode terminal when run in silent mode while TEDIT only runs in block mode.

Doug Miller

unread,
Feb 5, 2014, 4:21:19 PM2/5/14
to
wbreidbach <wolfgang....@gmail.com> wrote in
news:f67e295a-75f2-4569...@googlegroups.com:

> Just let me add one thing: As far as I know EDIT does not need a
> blockmode terminal when run in silent mode while TEDIT only runs
> in block mode.

Edit doesn't need a blockmode terminal for line-mode editing, whether it's silent or not.

wbreidbach

unread,
Feb 5, 2014, 5:32:25 PM2/5/14
to
I know, just wanted to tell the difference to TEDIT. I am using EDIT myself in some routines to avoid TEDIT.

Shiva

unread,
Feb 6, 2014, 11:06:55 AM2/6/14
to
@Keith: Thanks again for all that explanation. And thanks for clearing the air about TEDIT & EDIT. I've heard the difference before but just now realizing that you were talking about the other one. Cool! There's no point in asking which one is the best, I guess. Both will have their merits and demerits.

@Doug: Thanks, Doug! I forgot that you mentioned in the program itself. I remembered after posting the comment, but by then it was a little late! :D

@wbreidbach: Blockmode terminal? What does that mean? And why does EDIT not need it and TEDIT needs it?

dave....@gmail.com

unread,
Feb 6, 2014, 11:17:44 AM2/6/14
to
A block mode program works on a screen of data at a time - typically in the 6530 world 80 characters by 24 lines. TEDIT is only available in block mode and Edit has the option of using a line-by-line mode or a block mode by issuing the XVS F (F for first, L for last page) after opening a file in conversational mode.

Dave

Shiva

unread,
Feb 6, 2014, 12:19:08 PM2/6/14
to
Oh cool. Then EDIT is obviously better than TEDIT huh? I'll give it a shot, thank you! :)

dave....@gmail.com

unread,
Feb 6, 2014, 2:06:33 PM2/6/14
to
On Thursday, February 6, 2014 12:19:08 PM UTC-5, Shiva wrote:
> Oh cool. Then EDIT is obviously better than TEDIT huh? I'll give it a shot, thank you! :)

Well not necessarily better. Each has different and powerful capabilities that can be used in different ways. Of course I've pretty much stopped using both of them and use UltraEdit which reads and write files directly to a NonStop server with the added benefit of column-based cut-and-paste editing (although it does require ftp access).

Dave

Keith Dick

unread,
Feb 7, 2014, 5:39:29 AM2/7/14
to
I'm not sure you got a clear enough explanation of block mode vs. interactive or conversational terminal.

A conversational terminal typically sends a character to the computer as soon as it is typed. The typed character might be displayed on the screen immediately by the terminal, or the computer might send the characters back to the terminal as it receives them, and they are only displayed when received back from the computer.

A block mode terminal typically only sends data to the computer when a function key is typed, or in response to a read screen command received from the computer. For block mode, the typed characters are almost always displayed immediately by the terminal, not echoed from the computer.

Some terminals can operate in either mode, and the switch between them usually occurs when the computer sends a command telling the terminal which mode to go to.

Your terminal emulator, I believe you said it was Win6530, emulates the Tandem 6530 terminal, which can operate in either mode. When you are working at the TACL prompt or in utilities like FUP, SCF, PERUSE, SPOOLCOM, etc., the terminal is in conversational mode. When you run TEDIT, TEDIT sends the command to switch the terminal to block mode. When you exit TEDIT, TEDIT sends the command to switch the terminal back to conversational mode.

Some conversational terminals implement escape sequences that can move the cursor to arbitrary points on the screen. Programs can similate the look of a block mode interface on such terminals. I don't remember any examples of that being done with NonStop products, but there might be some.

You have mentioned things that indicate you have worked on IBM mainframe systems. So you probably are familiar with IBM 3270 terminals. They are the prototypical block mode terminal. I think most 3270s had no conversational mode.

Keith Dick

unread,
Feb 7, 2014, 5:49:49 AM2/7/14
to
Oh, I forget to address the why EDIT does not need block mode while TEDIT does.

EDIT does not need block mode simply because it does all of its work based on commands entered on the command line. It never tries to switch to block mode. (There is an add-on to EDIT called VS which does switch the terminal to block mode and allows you to edit a file in that style, but you never have to use VS.) TEDIT can only work in block mode, since that was the way it was designed. Even TEDIT's command-line-style commands are entered in a field of the block mode screen. So if you try to run TEDIT from a terminal that does not support the Tandem 6530 block mode, it simply will not work. I believe the OS's terminal driver software gives TEDIT an error return when TEDIT makes the call to switch the terminal to block mode.

wbreidbach

unread,
Feb 7, 2014, 6:43:42 AM2/7/14
to
Concerning 3270: My knowledge is somewhat rusty but in former times the 3270 had a line mode. The 3270-emulation is very similar to the 6530-emulation the main difference are the different control sequences.

Keith Dick

unread,
Feb 7, 2014, 7:17:50 AM2/7/14
to
You might be right. I never worked with 3270 terminals. The Wikipedia article about them seems not to mention anything but the block mode, but it might be missing some information or I might have missed its mention of a conversational mode. I don't remember ever hearing that the typical 3270 had a conversational mode.

I know that Tandem implemented a pseudo conversational interface in one of the access methods for 3270 terminals. The terminal did not transmit the characters as they were typed, but only when you pressed the return key or maybe it was a function key that served in place of the return. The access method made this look like a conversational terminal to the application, so you could logon to a TACL and run conversational programs from a 3270 screen. I never saw it in use. I've only read about it long ago, so I could be misremembering many details.

The IBM OS might have implemented a similar pseudo conversational interface to 3270 devices. If the IBM mainframes had an interactive environment similar to our TACL and other conversational utilities, there certainly would have been some motivation for them to do so. However, I never had the opportunity to work on an IBM mainframe, so I do not know whether such an environment existed.

wbreidbach

unread,
Feb 7, 2014, 7:47:47 AM2/7/14
to
Many years ago we had a couple of coloured IBM 3270-terminals connected to our Tandem and used them primarily in blockmode to show EMS-messages from all systems in different colors with a program I wrote (the program is still in use). Some time ago I went through that program to implement the bigger screensizes and the program still contained the code to serve the 3270-terminals. So I know (again) that serving a 3270-terminal is very similar to serving a 6530-terminal in blockmode. And from the former times I know the 3270 conversational mode, that was aout 1975 and it was before ISPF was available.

Keith Dick

unread,
Feb 7, 2014, 9:02:34 AM2/7/14
to
I do not believe there is any disagreement that the block mode interface for a 3270 is very similar to the block mode interface for a 6530.

The question is whether the 3270 is capable of operating in a way that is similar to the 6530's non-block mode, in which each character is transmitted to the computer as it is typed. Everything I ever remember hearing or reading about the 3270 indicates that it has no such mode of operation. Software drivers can simulate it by painting the screen with a field for each line, repainting the screen, and so on.

I was just reading Michigan Terminal System, Vol 4, found on Google Books via a regular Google search for the words [ 3270 conversational mode ](that manual was down a couple of pages in the results), that seems to talk about a mode that takes some of the work of doing that sort of interface into the terminal. It talks about the terminal (or maybe it is the controller) maintaining a buffer of lines (higher and wider than the screen), and being able to scroll around in them locally, and having the terminal add new output lines to the bottom of the buffer (and discarding the ones that get pushed off the top), and editing the line *before it is transmitted to the computer*, and transmitting the line in which the cursor sits when the Enter key is pushed.

That certainly sounds different than typical block mode operation. I notice that you were using the term line mode, and that does seem to be what that MTS manual is describing -- a terminal interface in which the unit of data transfer is the line. Not the whole screen or all the modified fields on the screen. And not one character at a time as they are typed, which is how the 6530 terminals (and many, many "Ascii" terminals or "glass TTY" terminals) work.

I have no idea whether all or most 3270 terminals were capable of operating in that line mode. I wouldn't be surprised if it were an extra cost option, and was not included in the basic 3270, but that is just a guess. It might even have been a custom capability implemented especially for Michigan's use in developing MTS, but if you remember using an interface that worked like that on a 3270 terminal, it probably wasn't a custom modification for that one site.

So it appears that the 3270 devices, or at least some models of them, had both the typical block mode of operation and this line mode, which stored lines locally and transmitted a whole line only when the Enter key was pushed. But I still have seen no hint that 3270 devices had a mode in which they transmitted characters individually, as soon as they were typed.

Shiva

unread,
Feb 7, 2014, 3:36:13 PM2/7/14
to
@Dave: Well I thought the same before I typed that comment. But I knew that once I typed the comment, I'll get to know a lot more now on EDIT & TEDIT because you lot will try to explain to me so that I can understand better. So this is how being wrong feels. Enlightened! :D

@Keith: I pretty much got most of what you were trying to say. And I'm saying this again, you explain in a very understandable way. May be when you're done with tandems, you can go back to school and teach some kids! Ha!

And yes, what you say is mostly right. Because most of the screens where we work on 3270s, it is block mode. You just feel it everywhere with mainframes. But some screens, I can't remember which exact utilities or screens at this moment, are conversational too - in IBMs interface. Probably some utility. Not the whole 3270 interface. But I've a doubt.

Even while using EDIT, only if you press the return key the command is executed. In other words, data is sent only when "function key" is typed. No?

That doubt might possibly mean that I did not get your message on the following line exactly:
"A conversational terminal typically sends a character to the computer as soon as it is typed. The typed character might be displayed on the screen immediately by the terminal, or the computer might send the characters back to the terminal as it receives them, and they are only displayed when received back from the computer."

Goes back to say, I'm not the right person to say whether 3270s used conversational mode - though I almost get the point. Like how we do in dos prompt, right? Rather than working on a MS word. (a stupid comparison - but that's the only thing I can come up with, at 2 in the morning). Rather than totally taking control of the screen, still working on like a chat system. Just like how tacl prompt works. Right?

Keith Dick

unread,
Feb 7, 2014, 5:40:43 PM2/7/14
to
Shiva wrote:
> @Dave: Well I thought the same before I typed that comment. But I knew that once I typed the comment, I'll get to know a lot more now on EDIT & TEDIT because you lot will try to explain to me so that I can understand better. So this is how being wrong feels. Enlightened! :D
>
> @Keith: I pretty much got most of what you were trying to say. And I'm saying this again, you explain in a very understandable way. May be when you're done with tandems, you can go back to school and teach some kids! Ha!
>
> And yes, what you say is mostly right. Because most of the screens where we work on 3270s, it is block mode. You just feel it everywhere with mainframes. But some screens, I can't remember which exact utilities or screens at this moment, are conversational too - in IBMs interface. Probably some utility. Not the whole 3270 interface. But I've a doubt.
>
> Even while using EDIT, only if you press the return key the command is executed. In other words, data is sent only when "function key" is typed. No?

We are talking about different levels in the software. At the application level, in EDIT, for example, the READ of the input line does not complete until the carriage return has arrived at the computer. But the terminal did not wait until you typed the carriage return to send the previous characters that you typed. Those previous characters were sent to the computer as soon as you typed them. The device handler process in the OS is the place where those characters were saved until the carriage return arrived.

In OSS and most Unix systems, the device handler does not hold the characters until the carriage return is typed. There, the application program can get the individual keystrokes as they are typed. You have said you are not familiar with Unix or Linux systems, so that comparison probably doesn't help you as much as it might.

Actually, Guardian programs can be written to receive characters as they are typed. The device handler for terminals completes the operation on either receiving a carriage return OR when the user's read buffer becomes full. If the program specifies a read count of 1, it will get each character as soon as it is typed, but Guardian was not designed with that in mind, and various overheads in handling the I/O make it a little difficult to be sure you can post the next read before the next character arrives, so that technique isn't generally used for Guardian programs.
>
> That doubt might possibly mean that I did not get your message on the following line exactly:
> "A conversational terminal typically sends a character to the computer as soon as it is typed. The typed character might be displayed on the screen immediately by the terminal, or the computer might send the characters back to the terminal as it receives them, and they are only displayed when received back from the computer."
>
> Goes back to say, I'm not the right person to say whether 3270s used conversational mode - though I almost get the point. Like how we do in dos prompt, right? Rather than working on a MS word. (a stupid comparison - but that's the only thing I can come up with, at 2 in the morning). Rather than totally taking control of the screen, still working on like a chat system. Just like how tacl prompt works. Right?

I'm not sure I see what you are trying to say here. The underlying mechanisms are very, very different between PCs and a mainframe running a 3270 terminal, but if you are thinking only of how it looks like to the person using the terminal, then, yes, 3270 block mode is like Word taking over the whole screen on a pre-Windows PC, while conversational mode looks like working at the DOS prompt.

Shiva

unread,
Feb 8, 2014, 2:30:30 PM2/8/14
to
@Keith: Thanks for that detailed explanation. Got more than what I wanted. Thanks :)

harald...@benteler.de

unread,
Feb 10, 2014, 2:03:37 AM2/10/14
to
Am Dienstag, 4. Februar 2014 19:02:08 UTC+1 schrieb Shiva:
> Say I need a macro that will do this.
>
>
>
> In tacl prompt I type:
>
>
>
> RUN MACRO FILENAME
>
>
>
> And within the macro I've to define the words which need to be found and replaced with some other words.
>
> Like say, if inside the file there's a word called "Shiva" written 'n' number of times, it needs to be changed to "Sam" n number of times. Not just one find and replace text - two or three, basically many. Like "Keith" to "Robin". And "Randall" to "Max". The length of the characters may differ. The file is of type 101. Also, I'd like to add that usually when you find and replace it will not go beyond 132 characters so you need not worry about that coherency.
>
>
>
> Is there a way to do it? If so, can you please let me in on it?

If you don't want to invent a TACL routine, take a look at
http://www.greenhouse.de/freeware/guardian-freeware/freeware-details/tools/change.html
0 new messages