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

describe 805 error

6 Answers   DELL,


What are the different data types available in COBOL?

4 Answers  


Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed to 4 characters) and forgot to change the DCLGEN in COBOL program, what will happen during the execution of code? If the program Abends then what will be the error? If it doesn't abend then hpw the error can be catched?

5 Answers   IBM,


in a indexed file what is procedure for read the records from 12 to 18. please give the code example

2 Answers   L&T,


IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.

2 Answers   ADNA, CSC,






In the JCL, how do you define the files referred to in a subroutine ?

2 Answers  


01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'abcde' to var1 then waht is the value of var1 and var2

9 Answers   HSBC,


Did anybody attend the walkin of TCS on 31st July in Gurgaon for any technology,If u have completed 3 round i.e till the HR round,have u received the Offer letter yet? Please let me know.Thanks.

1 Answers  


Which mode is used to operate the sequential file?

0 Answers  


Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.

2 Answers  


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

0 Answers  


what happens when a copybook variables are declared using include statement ?

3 Answers   IBM,


Categories