-
Notifications
You must be signed in to change notification settings - Fork 35
/
STRINGP
23 lines (23 loc) · 852 Bytes
/
STRINGP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
********************************************
* COBOL PROGRAM USING STRING *
* DATE : 07.07.2020 *
* AUTHOR : VIJAY KUMAR *
********************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. STRNGPGM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-CUST-NAME PIC X(40).
01 WS-CUST-FIRST-NM PIC X(20) VALUE IS "VIJAY".
01 WS-CUST-LAST-NM PIC X(20) VALUE IS "KUMAR".
01 WS-CUST-POINT PIC 9(2) VALUE 05.
PROCEDURE DIVISION.
STRING
WS-CUST-FIRST-NM , WS-CUST-LAST-NM
DELIMITED BY SIZE
INTO
WS-CUST-NAME
WITH POINTER WS-CUST-POINT
END-STRING.
DISPLAY WS-CUST-NAME.
STOP RUN.