COBOL/400

525 pts.
Tags:
AS/400
COBOL
COBOL statements
COBOL/400
Hi Group,
I have the code in this format
IDENTIFICATION DIVISION
PROGRAM-ID. PGM.
--------
--------
DATA DIVISION.
FILE SECTION
FD  PHONEFILE
01  PHONE-REC.
------------
------------
PROCEDURE DIVISION.
<In Procedure division i have written an record into the PHONEFILE>
WRITE PHONE-REC.
I would like to pass the PHONE-REC record to a sub-program.
<My question is, Can i pass the complete record to a sub-program for further processing??>
CALL "SUBPGM" USING PHONE-REC.
Please correct me if i am wrong.
Regards,
M


Software/Hardware used:
COBOL/400.
ASKED: June 24, 2011  5:45 PM
UPDATED: June 24, 2011  11:29 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Can i pass the complete record to a sub-program for further processing? Yes. But you should make sure that you have that record image defined in Working Storage rather than under a File Section FD entry. It looks like your WRITE PHONE-REC statement is writing directly from a FD record image. If it was writing from Working storage, it would probably look something like:
    WRITE PHONE-REC  from  WS-PHONE-REC
    ...or some similar format. I wouldn't be comfortable passing parms that referenced my I/O buffer areas. I don't think I've ever tried it to see what results might come from it. Do you have a problem? An error message? Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following