IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What does RETURN command do in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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]
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Routing command Address SDSF to other... TSO/ISPF 2
Search our Forums:

Back to Top