Mainframes 360
The one stop destination for System Z professionals

Wednesday, September 2, 2009

Basic Procedure Division Verbs

Q. What is the MOVE verb in Cobol?
When you declare a variable in Cobol, the computer books and reserves memory space for you, to store data. Assume that, I declare a variable in my Cobol program GROSS-PAY.

image

The variable GROSS-PAY has a picture string 9(04)V99, it is six bytes in size. The computer reserves a six-byte slot in the memory for storing my data, as shown in the picture below. This storage field is identified by the name GROSS-PAY.

  image

The GROSS-PAY variable is empty yet. Storing data in the GROSS-PAY variable can be accomplished using the MOVE statement. The MOVE statement assigns and stores data in a Cobol variable. It is a Data-Transfer verb.

image

The above MOVE statement transfers the number 1500.00 into the memory location GROSS-PAY.

  image

A MOVE statement may also transfer data from one field(variable) to another field(variable). In the below example, the contents of the variable DEARNESS-ALLOWANCE are transferred, MOVE’d to OUT-DA variable. DEARNESS-ALLOWANCE is said to be the sending field, whereas OUT-DA is the receiving field.

image

To many people who are thrown to work at a mainframe computer on their first job, they feel lost. Mainframe people seem to speak a completely different language and that doesn't make life easy. What's more, the books and manuals are incredibly hard to comprehend.

"What on earth is a Mainframe?" is an absolute beginner's guide to mainframe computers. We'll introduce you to the hardware and peripherals. We'll talk about the operating system, the software installed on a mainframe. We'll also talk about the different people who work on a mainframe. In a nutshell, we'll de-mystify the mainframe.

Readers based in India, can buy the e-book for Rs. 50 only or the print book. International readers based in the US and other countries can click here to purchase the e-book.