From the course: COBOL Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using the unstring command in COBOL

Using the unstring command in COBOL - COBOL Tutorial

From the course: COBOL Essential Training

Start my 1-month free trial

Using the unstring command in COBOL

- [Instructor] The last string verb that I'd like to talk about is the unstring verb. The unstring verb and COBOL is used to divide a larger string into substrings, this is the opposite of the string command, which took substrings and merged them together or concatenated them together into one large string. Have you ever worked with a comma delimited file? These files are often created from Excel, and this type of file was a great candidate for the unstring verb. Comma delimited files contain variable length data that's separated by commas. Let's take a look at an example of a comma eliminated file. Here I have an excerpt of weather data that I got from Google's big query. This file contains data that separated by commas. It starts with a station ID, followed by the month, day, and year. And then it has some information about the weather that occurred on that day. What I need to do is take this file and actually convert…

Contents