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 

What is Macro Language?

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


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue Apr 29, 2003 6:52 am    Post subject: What is Macro Language? Reply with quote

Hi,

Today I came to know that REXX is a macro language. Could anyone tell me what is a 'Macro Language'?

Regards,
Diba.
Back to top
View user's profile Send private message Send e-mail
Ashish Jain
Beginner


Joined: 09 Dec 2002
Posts: 15
Topics: 0
Location: India

PostPosted: Tue Apr 29, 2003 7:04 am    Post subject: Reply with quote

May be a language which doesn't need any compiler !
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue Apr 29, 2003 7:27 am    Post subject: Reply with quote

Ashish Jain,

That would possibly be interpreter language.

It seems REXX is an 'Interpreter Language' as well as 'Macro Language' and also 'Procedural Language'.

Somebody please throw difference between the last two.

Regards,
Diba.
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: Tue Apr 29, 2003 7:45 pm    Post subject: Reply with quote

I'd think that calling something a macro language is not really a significant designation because, if my interpretation (guess) is correct, a macro language would be any language with which you can implement a macro, where a macro is defined as a program that simplifies or automates the operation of another program. Take two examples... Using Rexx with ISPF Edit macros, would make Rexx a 'macro language'. But you can do the same work in COBOL, Assembler, C, Pascal... whatever. So that would make all languges 'macro languages'. On the other hand, the 'language' used to create assembler macros is a 'language' with a specific purpose: simplifying the operation of the assembler itself. That is what I would think of as a true 'macro language'. I wouldn't call Rexx a macro language per se, though it can be used as one.

Procedural Languages are basically those languages which have an orderly, mostly linear program flow which includes main programs and subroutines. A better way to think of it is by looking at languages that are not procedural. Object oriented code is often called non-procedural because, although it has procedures (as in the rexx procedure keyword), much of the work a program does is done within objects that have behaviors of their own. (It is a little fuzzy to me why that is different than calling an API, but OO programs do have a very non-linear flow). Another example (again sort of OO) is Visual Basic where things occur in response to messages, not just subroutine calls. Again, there is not necessarily a linear flow and in fact there may be a great deal of mulitasking that your program isn't even aware of. So... is C procedural when used in the non-linear environment of Windows? I'm not sure, but I would think so since the program itself is not normally handling the message queues. I'd think that is why a routine that handles such messages is called a 'Windows Procedure'.

Whew! That was more than I was expecting to type -- Sorry Embarassed Complete and total disagreement and destruction of my theories is welcome Shocked
Back to top
View user's profile Send private message Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Wed Apr 30, 2003 6:27 am    Post subject: Reply with quote

semigeezer,

Thanks for detailed reply. After reading more on REXX I found that it is a procedural language designed to work as a macro language as well. This is probably what you said.

Diba.
Back to top
View user's profile Send private message Send e-mail
sp_shukla
Beginner


Joined: 09 Apr 2003
Posts: 9
Topics: 0

PostPosted: Wed Apr 30, 2003 7:31 pm    Post subject: Reply with quote

I don't know what is a "Macro langauge" but what I learnt in college is "Macro is a program which that simplifies or automates the operation of other program." As semigezzer has already stated this.

But then there is a difference between Macros and Subprogrames. Subprogrames are separte programes they load into the memory at different place then the main program. And when Program calls the subprogram the control actually transfers to the subprogram and after perfroming it's job the subprogram transfers the control back to the main program. Obvious disadvantage of this approch is time, every time you shift the contol it takes more time than executing just any other next instruction. And in case of dynamic linking this time is even greater as your subprogram needs to be loaded into the main memory first. By doing the static linking you can reduce this time but then too it's more than the what a macro would take.

In case of a macro, when the program performs a Macro, the macro code is actually added(or inserted) to your program. So it's like executing just any other instruction and it saves your time which is required in case of a subprogram. One disadvantage of this approch is it increases the length of the program as the macro code is added to the program.

It may not be the answer you are looking for and again I don't know what a macro language is Sad , but this is, broadly ,what a macro is.


SP
Back to top
View user's profile Send private message Send e-mail
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu May 01, 2003 12:37 am    Post subject: Reply with quote

Thnaks SP,

Any related thought is welcome.

Diba.
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: Thu May 01, 2003 1:37 am    Post subject: Reply with quote

That is a good definition of a 'macro' that is used as a preprocessor to a compiler or assembler (that type of macro doesn't actually run at execution time, just at compile time), but more broadly a macro which runs at execution time necessarily includes calls outside of the macro itself, such as to APIs. Examples are emulator macros (calling things like EHLLAPI), ISPF edit macros (calling ISREDIT), keyboard macros on a PC (calling APIs to pass input to the keyboard event handler). It just goes to show that the word 'macro' itself has several meanings, I guess Neutral
Back to top
View user's profile Send private message Visit poster's website
DaveyC
Moderator


Joined: 02 Dec 2002
Posts: 151
Topics: 3
Location: Perth, Western Australia

PostPosted: Fri May 02, 2003 7:46 am    Post subject: Reply with quote

Quote:
So... is C procedural when used in the non-linear environment of Windows?


That's an Interesting point. I would say yes because C is a procedural language. But I've got Microsoft Visual C++ and I can't see a big difference between C and C++ in a windows environment. In fact, Visual Basic makes programming in Windows a lot easier. Of course, you alwasys hack the API when you have a need for speed. Apple operating systems are written in Objective C, which is an OO flavor of C, not C++...
_________________
Dave Crayford
Back to top
View user's profile Send private message Send e-mail
Troodon
Beginner


Joined: 10 Sep 2004
Posts: 9
Topics: 4
Location: Johannesburg, Gauteng, South Africa

PostPosted: Mon Jan 10, 2005 3:35 am    Post subject: Reply with quote

My definition of a macro language is any language used to execute the commands of a particular enironment. e.g. In Microsoft word you can create macros that execute a string of MS Word Commands. In DOS you would create .BAT files that are essentially MACROS for the DOS Environment. In Linux/UNIX there are a number of SCRIPT Languages which I would guess are MACRO Languages as they facilitate executing Linux/Unix commands. What makes REXX a macro language is the ADDRESS function which allows REXX to address a number of differrent command environments. EG ADDRESS TSO causes rexx to pass commands to the TSO Environemnt, ADDRESS ISREDIT Causes REXX to pass commands onto the ISPF EDIT Command environment, ADDRESS ISPEXEC causes Rexx to execute ISPF Commands. First of all REXX is a Procedureal language that has the facility to address other command environments. This facility enables it to be called a MACRO Language.
_________________
Man is the universe becoming Conscious of itself.
Back to top
View user's profile Send private message
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