Justify clause in COBOL

pts.
Tags:
COBOL
A COBOL pgm with a JUST RIGHT clause for an anphanumeric field does not function correctly under Enterprise COBOL. What am I doing wrong?

Answer Wiki

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

Since you didn’t provide us with information on exactly how you defined the field it’s difficult to determine why you’re experiencing the problem, especially since IBM’s extensions to COBOL now accomodate all the instances where you weren’t supposed to use JUST RIGHT.

About all I can suggest right now is that you make sure that: 1) the field is an elementary level field, and 2) the field is large enough to handle the source field’s data so it doesn’t truncate.

Hope this helps some.

Jim

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
  • JonP
    You really need to define what you mean by "correctly". For example this program: 77 Small Pic x(4) value 'abcd'. 77 Large Pic x(10) value 'wxyz'. 77 Target Pic x(20) just right. Procedure Division. MainProc. move Small to Target. Display Target. move Large to Target. Display Target. stop run. Works according to the specification - but is not "correct" if you expect the 'wxyz' to be aligned over the 'abcd'. This is because the 'wxyz' string is followed by 6 blanks and they are included as part of the data. You really need to post a sample of the code before we can help.
    0 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