Renames clause in cobol

5 pts.
Tags:
COBOL
COBOL statements
Programming Languages
RENAME statement
while using renames clause we are defining dataname-1 thru dataname-n. if i am having same datanames in another group which output can i expect?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Depending on which COBOL you are using, if you only use the field name it may default to the first one defined. However, virtually all flavors of COBOL support a qualification of COBOL field names and you probably want to use that syntax..

01 IN-REC.
05 FIELDA PIC X.
05 FIELDB PIC X.

01 WORK.
05 FIELDA PIC 9.
05 FIELDB PIC 99.

MOVE SPACES TO FIELDA OF IN-REC.

ADD FIELDA OF WORK TO FIELDB OF WORK.

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
  • NerdsCentral
    With the MF compiler, if the name created by the renames clause is the same as another name, and you do not use the "x of y" qualified name syntax, then it will produce a compile time error saying 'data names not unique' or words to that effect. To search COBOL documentation - please check out the COBOL search engine at Nerds-Central http://www.nerds-central.com/Search/MicroFocusCOBOL.html
    10 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