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

wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,


How can we increase the size of an existing PDS to include more no. of modules.

3 Answers  


What is R-mode and A-mode?

3 Answers   TCS,


how can u redefine picx(10) with pic 9(6).

3 Answers   TCS,


how can u pass the values into db2 values from cobol ?

3 Answers   CTS,






If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will display only 3.(the next sentence, ie., after fullstop/period) ____________________________________ if a>b continue end-if display 1 display 2. display 3. If a>b, it Will display 1 2 3 (the next statement) ____________________________________ if a>b continue display 1 end-if display 2 display 3. display 4. If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?

8 Answers   UST,


How to know whether the module is dynamical or statistical?

0 Answers  


HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?

2 Answers  


i have two file one is ksds another one is esds i want store matching records in flat file how to you matching.

2 Answers   Wipro,


What are the situations u have used in ur project for Subcript and Index ? 1.if u use Subscript why not Index,why u choose Subscript only? 2.if u use Index why not Subscript,what abt Displacement?

2 Answers   Cap Gemini,


If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.

3 Answers   CTS,


How to use the same COBOL program in Batch and CICS on lines? explain with an example

0 Answers   IBM,


Categories