Some questions about MAP Processing and Data Validation



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: Some questions about MAP Processing and Data Validation

Postby rogerb » Fri Aug 10, 2018 7:58 pm

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
rogerb
 
Posts: 55
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Re: Some questions about MAP Processing and Data Validation

 

Re: Some questions about MAP Processing and Data Validation

Postby Robert Sample » Fri Aug 10, 2018 8:17 pm

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.
Robert Sample
Global moderator
 
Posts: 3507
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 248 times

Re: Some questions about MAP Processing and Data Validation

Postby rogerb » Fri Aug 10, 2018 9:45 pm

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
rogerb
 
Posts: 55
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Some questions about MAP Processing and Data Validation

Postby Robert Sample » Fri Aug 10, 2018 10:14 pm

Can you manually type in a [ then the word code then a ], put in some code, then type a [ and /code and a ]?
Robert Sample
Global moderator
 
Posts: 3507
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 248 times

Re: Some questions about MAP Processing and Data Validation

Postby rogerb » Fri Aug 10, 2018 10:28 pm

I've did like you told me, and click submit, and the problem persists.

Thank you,
Roger
rogerb
 
Posts: 55
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Some questions about MAP Processing and Data Validation

Postby rogerb » Sat Aug 11, 2018 10:22 pm

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
rogerb
 
Posts: 55
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Some questions about MAP Processing and Data Validation

Postby NicC » Sun Aug 12, 2018 2:56 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2781
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 114 times

Re: Some questions about MAP Processing and Data Validation

Postby Terry Heinze » Mon Aug 13, 2018 7:03 pm

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.
.... Terry
Terry Heinze
 
Posts: 207
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: Some questions about MAP Processing and Data Validation

Postby rogerb » Mon Aug 13, 2018 9:14 pm

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
rogerb
 
Posts: 55
Joined: Sat Jul 28, 2018 9:14 pm
Has thanked: 5 times
Been thanked: 0 time

Re: Some questions about MAP Processing and Data Validation

Postby Terry Heinze » Mon Aug 13, 2018 10:57 pm

Are you saying that you still have a problem using the code tags?
.... Terry
Terry Heinze
 
Posts: 207
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

PreviousNext

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post