give the examples for strings and unstrings in cobol
Answers were Sorted based on User's Feedback
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 |
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 |
What are the different data types in cobol?
What are the different open modes available in cobol?
What is XDC ?
How to pass return codes from cobol to jcl?
can we display comp-3 variables. if we want to display what we have to do . give me one example
What type of Call you would use if you don;t want the control back to the calling program?
How to Pass table from a cobol program to another cobol program and how to use that table in called program
What is SSRANGE, NOSSRANGE ?
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???
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
How arrays can be defined in COBOL?
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.