) How to run a JCL from COBOL program, plz try to give the code/logic.
2) What does RETURN command do in COBOL.
3) plz check the code ,
01 A PIC A(4).
01 B PIC A(6).
ACCEPT A. (I/P IS :- AMAL)
ACCEPT B. (I/P IS :- KISHOR)
MOVE A TO B.
DISPLAY B. (What will be the O/P)
Q)Here if i move A to B , string AMAL is moved ,and KISHOR is wiped totally ,
but as alphabetic sequences are concerned ,it starts from the left hand side(MSB).
so B must have AMALOR ,but it has AMAL .
why is it so.
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
The RETURN statement is very much like the READ statment, only used to retrieve records from an internal SORT procedure.
The RETURN statement transfers records from the final phase of a sorting or merging operation to an OUTPUT PROCEDURE.
The RETURN statement can be used only within the range of an OUTPUT PROCEDURE associated with a SORT or MERGE statement.
Here is the full description of the RETURN statement from the IBM COBOL manual.