HELLO FRIENDS,
THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING
QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE
IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER
Answers were Sorted based on User's Feedback
Answer / nihar ranjan karan
I completely agree with Nikhil...
To add up a few more points which will be of help.....
Open up a dataset and put HEX ON , you will see the
following results assuming the variable occupies 4 bytes of
space:
low values 00000
00000
high values FFFF
FFFF
spaces 4444
0000
display item numbers FFFFFFFFFF
0123456789
characters A - Z will be of the following form:
C1-C9 will represent A-I,D1-D9 will represent J-R,E2-E9
will represent S-Z
comp-3 ...for example if number is positive 5893.
0083
059C
for negative last character will be D.
For comp it is converted into its hexadecimal equivalent.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / jeena.mj
You cannot move LOW-VALUES or HIGH-VALUES to a "PIC 9"
field.
if we move low value and high values to alpha or
alphanumeric field the low value and high values are
x'0000' and x'FFFF'
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / nikhil
answer 2 is misleading. First of all you cannot use these
figurative constants for numeric variables.Second the first
answer gives the correct value. Please do not post anything
without confirming. Our aim is to provide correct answers.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / jack
What to check for alphanumeric fields
Move spaces to low-values
Move 'zzzzzzzz' to high-values.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sejacoemor
I agree with Nikhil that our aim is to provide correct answers.
For Answer #4 (Nihar Ranjan Karan)
to compute for number of bytes for COMP-3:
count the total number of digits, divide it by 2 (disregard any fraction) then add 1. So, in the example if number is positive 5893.
it will be stored in 3 bytes only (not 4)
083
59C
---------------------------------------------
For Answer #5 (which actually a question from Prasenjit_in)
moving LOW-VALUES to a KEY-FIELD will point to 1st record while moving HIGH-VALUES to KEY-FIELD points to last record.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / prasenjit_in
HI all related to high values i also faced a sort of similar
question....The question was if we move high values to a
record structure of a file and then read it what will the
o/p show.will it show the last record in the file.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / necron
if the field is an alphabetic or alphanumeric you will have
spaces and if it is numeric you will have zeroes..(for low-
values)...i dont know abt high values! ;-)
| Is This Answer Correct ? | 1 Yes | 11 No |
i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?
What do you feel makes a good program?
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
can we display comp-3 variables. if we want to display what we have to do . give me one example
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
Write down the divisions of cobol program?
Hi Devolopers.. i need ur help.. i have 3 years of exp in Manual testing and SQL, next month onwards i shifted in to MAINFRAME TESTING... i have ZERO Knowledge abt mainframes.... PLS SUGGEST ME WHAT I LEARN in AMEERPET? mainframe testing or mainframe total devolopment subject... AS a devoloper u know every thing tester what to do PLSSSSSSSSS help me ITS VERY URGENT...
Can the OCCURS clause be at the 01 level?
What are the different data types in cobol?
What is the maximum size of a 01 level item in COBOL I? in COBOL II?
COMP field occupy ?
what is the size of W-REC in the following 01 W-REC 05 A PIC 9(4)V99 05 B READLINES A 10 C PIC XX 10 D PIC S9(4) 05 E OCCURS 7 PIC ZZ.ZZ 05 F OCCURS 5 10 G PIC ZZ.ZZZ99 10 H OCCURS 3 15 J PIC 9(3) 15 K PIC V99