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 |
Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be
if one main program ,n -subprograms are then which call you follow ?why reasonuhg
What is the utilization of copybook in cobol?
01 var1 pic s9(9)v99. 01 var2 pic x(30). procedure division. move 12345.99 to var1. move12345.99 to var2. display var1. display var2. what is the output?
Name the divisions, which are available in a cobol program?
There is a production file which has millions of records in it.The program that uses it ends up with an SOC7 abend.It is sure that the abend is due to some invalid data in the file.Is there any way to debugg the SOC7 abend with out giving displays? I need the record which is cause for the abend.
Can anybody give me example of subscript and index
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records...
2 Answers ITC Indian Tobacco Company, PNP, TCS,
How do you define a table/array in COBOL?
where will u code file status ?
study the following code 01 A1 05 B PIC 99 05 C PIC X(4) 01 A2 05 B PIC 99V99 05 C PIC A(4) pick out the valid statement from the following a.A1 and A2 can not have sub-ordinates b.A1 and A2 can have the same sub-ordinates but must have same PIC clause c.there is nothing wrong d.A1 and A2 can have same sub-ordinates provided they are not at 01 level
How can we pass data from cobol to JCl?