i have a requrement in A as viswa!@#$%&^**reddy i need to
move viswareddy in B without junk values pls say how to do
ths reply fast

Answers were Sorted based on User's Feedback



i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk val..

Answer / vinod

01 a pic x(19) value 'viswa!@#$%&^**reddy'.
01 b pix x(11).
procedure division.
move a(1:5) to b(1:5).
move a(15:5) to b(6:5).
display b.

Is This Answer Correct ?    17 Yes 1 No

i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk val..

Answer / priyanka

declare an 88 level with valid values as 'a' to 'z' and '0'
to '9'.
value = viswa!@#$%&^**reddy
move 0 to Y
move length of value to ws-value-length
Perform varying X from 1 by 1 until X > ws-value-length
move value (X:1) to 88-level-variable
if valid-value
add +1 to Y
move value(X:1) to out-value(Y:1)
else
continue
end-if
end-perform

out-value will be your output.

Is This Answer Correct ?    5 Yes 1 No

i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk val..

Answer / raghu

01 a pic x(19) value 'viswa!@#$%&^**reddy'.
01 b pix x(11).
procedure division.
perform a until ws-eof-str
if a is alphabetic
move a to b
display b
end-if
end-perform

Is This Answer Correct ?    0 Yes 0 No

i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk val..

Answer / guest

move a(1:5,15:5) to b

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

0 Answers  


Please let me know at which Scenarios we will go for STATIC call or DYNAMIC

3 Answers   IBM,


what is amode(24), amode(31), rmode(24) and rmode(any)?

0 Answers  


what is the maximum error code in mainframe

2 Answers  


can we use COPY statement in w-s section? how?

3 Answers  






what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?

3 Answers   TCS,


How to read records which is in sequential file in reverse order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my doubt any one

10 Answers   IBM,


In INITIALIZE what is Repalcing Word will do

1 Answers   CTS,


what are the error codes in cobol, db2, cics, vsam , and jcl

2 Answers   TetraSoft,


What is an in line perform? When would you use it? Anything else you wish to say about it.

0 Answers  


What is the use of LINKAGE SECTION?

1 Answers  


using redefine can you redefine lower variable size to higher variable size?

3 Answers   Patni,


Categories