Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS W..

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

HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS W..

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

HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS W..

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

HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS W..

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

HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS W..

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

HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS W..

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

HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS W..

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

Post New Answer

More COBOL Interview Questions

What are ISOLATION LEVELS? Where do we need to specify them?

3 Answers   EXL,


Give some examples of command terminators?

0 Answers  


what is srange and nosrange pls reply to ths question ?

2 Answers   L&T,


I have a Main Program which is calling Sub-Program which is a DB2 pgm. What will happen if I am not closing the cursor used in the Sub-program? Please advise..

3 Answers   iGate,


suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.

2 Answers   IBM,


Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?

12 Answers   T systems, Tech Mahindra,


consider the following piece of code 01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250

3 Answers   TCS,


what is the difference between implicit and explicit scope terminator with example? 

1 Answers  


plz,could any one tell me? what about EBCDIC in cobol?briefly?

1 Answers  


Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.

2 Answers  


01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

0 Answers  


Categories