Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What does RETURN command do in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
mittalrishi
Currently Banned

New User


Joined: 19 Dec 2005
Posts: 12

PostPosted: Mon Jan 30, 2006 9:22 pm    Post subject: What does RETURN command do in COBOL
Reply with quote

) 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 ,

IDENTIFICATION DVISION.
PROGRAM-ID. STR.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PIC A(4).
01 B PIC A(6).
PROCEDURE DIVISION.
ACCEPT A. (I/P IS :- AMAL)
ACCEPT B. (I/P IS :- KISHOR)
MOVE A TO B.
DISPLAY B. (What will be the O/P)
STOP RUN.

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.
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jan 31, 2006 4:52 am    Post subject:
Reply with quote

1) Do a search for INTRDR
2) Sets the return code of the pgm that is used bt the COND or IF clause in you JCL.
3) It pads the receiving field w/spaces when the end of the sending field is reached.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Feb 01, 2006 2:47 am    Post subject: Re: What does RETURN command do in COBOL
Reply with quote

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.


[url]
http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/igyl1101/3.28?ACTION=MATCHES&REQUEST=RETURN&TYPE=FUZZY&SHELF=&DT=19930312093006&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT[/url]
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 5 Fri Jan 20, 2017 12:36 pm
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us