give the examples for strings and unstrings in cobol

Answers were Sorted based on User's Feedback



give the examples for strings and unstrings in cobol..

Answer / gopi

String: It is a command which is to concatenates multiple variables into a single variable.
Ex: STRING yy,
"-",
mm,
"-",
dd
deliminate by size
Into ws-date.
End-string.

Unstring:It is a command which is to deconcatenates single variable into a multiple variables.
Ex: UNSTRING
ws-date.
deliminate by "-"
INTO
yy,
mm,
dd
End-string.

Is This Answer Correct ?    9 Yes 2 No

give the examples for strings and unstrings in cobol..

Answer / mohan.ch

string-add the 2 or more ws-vars to one ws-var
eg:-string ws-var1,ws-var2,ws-var3,ws-var4
into ws-var5
wel'
come,
to,
india
o/p wel come to india
unstring-split the varables to multiple
reverse of srting

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More COBOL Interview Questions

What are the different data types in cobol?

0 Answers  


What are the different open modes available in cobol?

0 Answers  


What is XDC ?

3 Answers   Cap Gemini, IBM,


How to pass return codes from cobol to jcl?

5 Answers  


can we display comp-3 variables. if we want to display what we have to do . give me one example

6 Answers   CGI, Deloitte,






What type of Call you would use if you don;t want the control back to the calling program?

8 Answers   TCS,


How to Pass table from a cobol program to another cobol program and how to use that table in called program

8 Answers   Patni, SunGard,


What is SSRANGE, NOSSRANGE ?

5 Answers  


Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???

5 Answers   IBM,


I hv ten records in ps file and i hv say some 15 records in vsam file .i hv empno and age in ps file n empno,empname,dept n desig in vsam file. i hv 2 read the ps file n check wid matching empno in vsam file and then insert all fields from ps and vsam into db2 table....plz help in writin the procedure division

1 Answers  


How arrays can be defined in COBOL?

0 Answers  


if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.

1 Answers   IBM,


Categories