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 ?
Answer Posted / cj
Numeric items are moved right to left (before the decimal
point) and left to right (after the decimal point) from
source item to the destination item.
So the answer for the first move=> Variable b will have
value 000123 in it. (In the question value 123 should be
within quotes)
Alphanumeric (as well as alphabetic) items are moved left to
right from source item to destination item.
So the answer for the second move=> Variable b will have abc
stored in it. (In the question value abc should be within
quotes)
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
Give some examples of command terminators?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
How arrays can be defined in COBOL?
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 ?
) how do u code after getting data?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
How you can read the file from bottom?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
Which mode is used to operate the sequential file?
what is search and searchall?what is the diffrence between them?give an best example?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
what is amode(24), amode(31), rmode(24) and rmode(any)?