Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us