Facing problem with decimal values in table



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

Re: Facing problem with decimal values in table

Postby ananya1212 » Thu Aug 15, 2013 12:23 am

"There are other problems here, but they amount to poor design rather than outright error."

THANKS FOR YOUR HELP . BUT COULD I PLEASE KNOW WHAT OTHER PROBLEMS DO YOU SEE IN THE CODE ? IT WOULD HELP ME A GREAT DEAL.
THANKS AGAIN.
ananya1212
 
Posts: 7
Joined: Wed Aug 14, 2013 9:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Re: Facing problem with decimal values in table

 

Re: Facing problem with decimal values in table

Postby Akatsukami » Thu Aug 15, 2013 12:40 am

ananya1212 wrote:"There are other problems here, but they amount to poor design rather than outright error."

THANKS FOR YOUR HELP . BUT COULD I PLEASE KNOW WHAT OTHER PROBLEMS DO YOU SEE IN THE CODE ? IT WOULD HELP ME A GREAT DEAL.
THANKS AGAIN.

  1. I do not understand why you have chosen to make your account numbers NUMERIC (= DECIMAL). IMPO, only genuinely computational entities ought to be declared packed decimal; by making this decision, you have foreclosed the possibility (without a lot of backtracking) of using alphas, hyphens, etc. in the account numbers (and do not tell me, "Oh, that will never happen"; if I had a thousand rupees for every time I've heard that and seen it proved wrong, I could retire).
  2. Your input is assigned to SYSIN. I'll lay money that you're using ACCEPT to read it. This is foolish.
  3. Apropos of that, although you show nothing of your code, I'll lay more money that you're doing no validation of the input. Think about various scenarios where bad data are entered, and how you could deal with them besides posting on some help board "Pls help me withsoc7 it is URGENT!!!".
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Facing problem with decimal values in table

Postby ananya1212 » Thu Aug 15, 2013 12:55 am

Please don't comment on things which you don't see. I have done validation checks for my input values. I have been struggling through this issue for a long time hence came here for help.Please help genuinely rather than pin-pointing somebody's faults only. I appreciate your help though but please have some respect for other's doubt as well. I am not as intellectual you are but I wish to be like you.
ananya1212
 
Posts: 7
Joined: Wed Aug 14, 2013 9:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Facing problem with decimal values in table

Postby dick scherrer » Thu Aug 15, 2013 10:09 pm

Hello and welcome to the forum,

Please help genuinely rather than pin-pointing somebody's faults only.
Pointing out what is not done well is one of the biggest ways we can help. . .

It is difficult for you to hear these comments. We intend to help you learn by pointing out what is wrong or needs improvement.

Keep in mind that the comments are usually for the "thing", not the poster. It serves no purpose for the dialog to be taken personally.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Facing problem with decimal values in table

Postby dfx1 » Tue Aug 27, 2013 1:02 am

Ananya1212, I sympathise with you entirely and wish you good luck. If you look at my recent post, you'll see it got a similar treatment. The title of this forum, IBM Mainframe Forum - A help and support site for Mainframe Students and new programmers, seems to me to be inaccurate. I would suggest : IBM Mainframe Forum - A help and support site for Mainframe Students and new programmers who enjoy being patronised. I just thought, if it's for students, then is it possible they are all teachers? That would explain a lot.
dfx1
 
Posts: 13
Joined: Fri Jun 14, 2013 1:17 am
Has thanked: 0 time
Been thanked: 0 time

Re: Facing problem with decimal values in table

Postby dick scherrer » Tue Aug 27, 2013 1:27 am

Hello,

If you must show your ignorance, please keep it in "your" topic(s). . .

While we are not all "teachers" in the classroom sense (some are or have been), we all do intend to help people learn.

Topic locked as TS has not replied recently and locking will prevent further nonsense . . .

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post