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
 
Regarding RETURN COmmand

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
bobbys

New User


Joined: 13 Oct 2005
Posts: 2
Location: hyderabad

PostPosted: Tue Nov 15, 2005 7:34 pm    Post subject: Regarding RETURN COmmand
Reply with quote

hi ,

RETURN SORT-EXTR-FILE
AT END MOVE 1 TO SORT-EOF-SW.


Can you please explain how the above command works.

in the above command SORT-EXTR-FILE is the work file.

THanks,
bobby
Back to top
View user's profile Send private message

Lkmi

New User


Joined: 04 Mar 2005
Posts: 53
Location: Newyork

PostPosted: Tue Nov 15, 2005 10:28 pm    Post subject:
Reply with quote

If you want to select, edit, or otherwise change sorted records before writing them
from the sort work file into another file, use the OUTPUT PROCEDURE phrase of the
SORT statement.
Each output procedure must be contained in either a section or a paragraph. An
output procedure must include both of the following elements:
v At least one RETURN or RETURN INTO statement
v Any statements necessary to process the records that are made available, one at
a time, by the RETURN statement
Chapter 11. Sorting and merging files 173
The RETURN statement makes each sorted record available to your output
procedure. (The RETURN statement for a sort file is similar to a READ statement for an
input file.)
You can use the AT END and END-RETURN phrases with the RETURN statement. The
imperative statements on the AT END phrase are performed after all the records
have been returned from the sort file. The END-RETURN explicit scope terminator
delimits the scope of the RETURN statement.
If you use the RETURN INTO statement instead of RETURN, your records will be
returned to WORKING-STORAGE or to an output area.
Coding considerations when using DFSORT
Back to top
View user's profile Send private message
Lkmi

New User


Joined: 04 Mar 2005
Posts: 53
Location: Newyork

PostPosted: Tue Nov 15, 2005 10:29 pm    Post subject:
Reply with quote

check out the COBOL for OS/390 & VM Programming Guide Version 2 Release 2 for more details
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Nov 16, 2005 7:25 am    Post subject:
Reply with quote

One other point about RETURN. You RELEASE the file-name and RETURN the record-name.

It's similar to READ the file-name and WRITE the record-name.

It's a minor point, but the compiler gets snippy about it. icon_smile.gif
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm

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