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

hw to create 3 dimensional array & hw to access it?

1 Answers  


is it possible to pass an SQL query inside a jcl which is inside a cobol program?

5 Answers   CTS,


What is Static and Dynamic linking ?

3 Answers  


How do you define a variable of COMP-1? COMP-2?

3 Answers  


consider the following piece of code 01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250

3 Answers   TCS,


study the data discriptions and answer the questions given below i)01 ORDER RECORD 05 OUT-HEADER PIC X(50) 05 ITEM-COUNT PIC 99 05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT ii)01 NAME-AND-ADDRESS 05 N-AND-A-LINE OCCURES 5 05 LINE-LENGTH PIC P9 05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH iii)01 SALES-LIST 05 SALESMAN-COUNT PIC 99 05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON SALESMAN-COUNT iv)01 ORDER-RECORD 05 NO-OF-BRANDS PIC 99 05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS which of the following is true? a.i) and iii) are valid b.i) and iv) are valid c.i) and iii) are not valid d.all are valid

4 Answers   TCS,


What is the difference between static call & Dynamic call?

2 Answers   CSC, TCS,


is it possible to declare index in cobol program? if it is not why its tell me pls

3 Answers  


Write a program to explain size error.

0 Answers  


There are two flat files one having 10 records and other having 5 records. write a cobol pgm to find the duplicate records(matching records)from both files.

1 Answers   Mind Tree,


Can we move X(9) to 9(9). If yes what are the ways for doing this?

3 Answers  


What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?

1 Answers  


Categories