Page 2 of 4

Re: Some questions about MAP Processing and Data Validation

PostPosted: Fri Aug 10, 2018 7:58 pm
by rogerb
Good afternoon to everybody.
Thank you for all your answers.
I've studied COBOL but I've never seen nothing about intermediate results.
When I search in google "COBOL handles intermediate results" I come to some pages, one being IBM:

https://www.ibm.com/support/knowledgece ... inr02.html

The page is interesting, but it doesn't show the reason I should use intermediate results.
If I understood well, if we have variables A with PIC 9(05), B, C and D, all three with PIC 9(02) and I code:

COMPUTE A = (B + C) * D


In the above case (B + C) is an intermediate result and after is multiplied by D it gives the final result.
But I don't see what's the advantage in using the intermediate result.
I'm still a COBOL "student" and when I don't know something, I will admit it instead of pretending to know more than I actually do.

Thank you,
Roger

Re: Some questions about MAP Processing and Data Validation

PostPosted: Fri Aug 10, 2018 8:17 pm
by Robert Sample
You don't "use" intermediate results; they exist in all complex calculations. There is no advantage nor disadvantage to intermediate results -- they just are. See Appendix A. Intermediate results and arithmetic precision in the manual http://publibfp.boulder.ibm.com/epubs/pdf/igy6pg20.pdf for details. Understanding intermediate results can be crucial to knowing what happens in COBOL.
COMPUTE A = B / C * D
very often will give you a different answer than
COMPUTE A = D * B / C
although the precise results will depend upon the PICTURE and USAGE clauses for A, B, C, and D.

Re: Some questions about MAP Processing and Data Validation

PostPosted: Fri Aug 10, 2018 9:45 pm
by rogerb
Thank you very much for your answers, Mr. Robert Sample.
Now, I was trying to post code but I've got the same problem.
I tried submitting with "code" and I also tried with "code=mainframe".
In both cases the post is shown as blank but if I choose the edit option all text appears.
I will try to do this post later.
Thank you,
Roger

Re: Some questions about MAP Processing and Data Validation

PostPosted: Fri Aug 10, 2018 10:14 pm
by Robert Sample
Can you manually type in a [ then the word code then a ], put in some code, then type a [ and /code and a ]?

Re: Some questions about MAP Processing and Data Validation

PostPosted: Fri Aug 10, 2018 10:28 pm
by rogerb
I've did like you told me, and click submit, and the problem persists.

Thank you,
Roger

Re: Some questions about MAP Processing and Data Validation

PostPosted: Sat Aug 11, 2018 10:22 pm
by rogerb
Thank you very much for your answers, Mr. Robert Sample.
I'm trying again to make a post with code and the post appears blank, but if I click edit all the content appears.
Mr. Enrico Sorichetti has already made a post complaining that I should use the code tags to post code, but in this case I can't do it.
Can I ask to make this post without the code tags ?

Thank you,
Roger

Re: Some questions about MAP Processing and Data Validation

PostPosted: Sun Aug 12, 2018 2:56 pm
by NicC
Have you tried by using the "POSTREPLY" button rather than the "Quick Reply" button?
Using the POSTREPLY button, first cut the code that you want post, then in the reply editor click the "Code" button then, without doing anything else, press CTRL-v. That should place your code within the code tags. Before posting, click on the "Preview" button to check your post. If it is OK you can complete editing it, Preview agaon and then "Submit" it.

Re: Some questions about MAP Processing and Data Validation

PostPosted: Mon Aug 13, 2018 7:03 pm
by Terry Heinze
It's actually easier than that. Click PostReply, then key your post, then Preview. If okay, click Submit.
While still in Preview mode, you can see the code tags generated for you. My mistake. You DO need to paste your post (instead of keying), if you've already done a cut or copy. Just follow the post by NicC.

Re: Some questions about MAP Processing and Data Validation

PostPosted: Mon Aug 13, 2018 9:14 pm
by rogerb
Thank you very much for all your answers.
I'm using POSTREPLY.
First I copy the text before the code.
Then I copy the code and paste it inside the code button.
At last, I copy the text after the code.
I clicked on preview, and everything seemed to be ok.
After that I click submit and when I go to the topic the post is also blank.


Thank you,
Roger

Re: Some questions about MAP Processing and Data Validation

PostPosted: Mon Aug 13, 2018 10:57 pm
by Terry Heinze
Are you saying that you still have a problem using the code tags?