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

given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1

5 Answers   Broadridge, TCS,


how to run sub programs using static and dynamic call ...

3 Answers   TCS,


In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?

3 Answers  


01 x pic s9(8) comp. How will the following value be internally allocated '18787'

4 Answers   Steria,


I have dataset DS1 which has records say 1 2 3 4 5 ... ... etc And also I have second dataset DS2 whcih has records 1 3 4 5 6 8 .. ... Both the files are sorted and now I want to compare these files and write it into the third files if the records are matching.

4 Answers   FIS, Wipro,






if a dataset is already created with fixed length but after that i want to change fixed length to variable length then how is it possible

3 Answers   IBM,


how will u retreive value from a table.write it with syntex. 01 ws-table 05 ws-table1 occurs 10 times. 05 ws-table2 occurs 10 times. the above is 2 dimensional array..how will u retrieve 1st element of an array

3 Answers   ADP,


What is SDSF?

13 Answers   IBM,


Can we change the password using ALTER? anyone tried and changed?

0 Answers   IBM,


Describe the cobol database components?

0 Answers  


If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it

7 Answers   BirlaSoft,


What is the local-storage section?

0 Answers  


Categories