The term macro has been used for programs called from within the assembler since the 1950s, and the generated text was rescanned. In the TSO world, edit macros written in CLIST are subject to controlled rescans while edit macros written in REXX are not.
There's a lot more to the history than what's in the wiki article. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Jeremy Nicoll [[email protected]] Sent: Thursday, January 28, 2021 5:10 PM To: [email protected] Subject: Re: ISPF for mainframe Linux On Thu, 28 Jan 2021, at 20:40, Bob Bridges wrote: > By the way, what in y'all's opinion is the proper use of the word "macro"? The classic computer science meaning is explained at: https://secure-web.cisco.com/1WzQ7OjlMZa3cnz8KU_ys2z1pVbKs0Xj22Pj6wh50ru_TFm9FCDfyDckYx6iR1o0tbp-DxcJknw80Dc6op2gg0DJkqKfVl2sGIIbHiVrdoRUFWXqNO1TMJwk7fxYkGug80lZTnkJjIRSxGgr666CA8YuvOgGQwXyhiC1UPg09lc5AkDkzgf_81RUj5bFaNgffOhMWWzjshjHr43VOQ6Xcm3kOSozj4pe7cQ3-UiWTxm0BanV8hisphkbnd8tquuMMLfcn86swtdgSskxGQ1wPAUMvXHv4yU47Uzb4hdxdU0mdYtr7BSisrUxSuZf6L6SGFd0HbRavCjX3AryDdTFmx0J-8ZnpwhpclBW-3kXYx-GI4K2Ausm-5MnjPYJsx5aCMHUMvF0dccSXb8-RyAOc-0oxd3KdNQbPWdTXhj9OmvvEfIm3ADlMGtLR2E5QdMrw/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMacro_%28computer_science%29 - it's where one character sequence is detected in a file and replaced by another. The place you're most likely to see simple ones is in C programs with things like #define PI 3.14159 so that wherever PI is placed in program source the C preprocessor will replace those two characters by the seven characters: 3.14159 It also supports more complex string substitutions where eg #define RADTODEG(x) ((x) * 57.29578) means that an instance of RADTODEG(17) in the program is replaced by the character string ((17) * 57.29578). The string is not evaluated - it's a direct string substitution before the compiler gets to see the code. The other obvious place is in Assembler where every time a macro is found in the code it is replaced by the instruction sequence it generates. The way that some applications record keystrokes and can then play them back is closer to this meaning of "macro" because they work by replacing a shortcut found in the keyboard buffer with the sequence of recorded keystrokes, as if the user had typed them instead. Of course, such processes these days tend also to record things like mouse clicks, so it's not so obviously just a character string replacement. I don't know why programs that run within an editor are named macros. Maybe the earliest ones were? If you say that a macro name placed in the command line gets removed and replaced by a stored sequence of editor commands, it's the same idea. But by the time the macro gets to the point of supporting a whole programming language of its own and might not issue any editor commands at all, it's harder to justify. -- Jeremy Nicoll - my opinions are my own. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
