Page 1 of 1

Skip last 3 bytes and first 3 bytes of data in cobol

PostPosted: Wed Dec 21, 2022 7:26 pm
by senthamizh
Hi,
i have a variable with char lenght 30.for example
Ws-ID x(30)
I want to skip the first and last 3 char from the value in ws-id.

For example
1.ws-id = abc123456e1b
The result should be 123456

Can any one suggest how this can be done in cobol

Re: Skip last 3 bytes and first 3 bytes of data in cobol

PostPosted: Wed Dec 21, 2022 10:50 pm
by sergeyken
senthamizh wrote:Hi,
i have a variable with char lenght 30.for example
Ws-ID x(30)

I want to skip the first and last 3 char from the value in ws-id.

For example
1.
ws-id = abc123456e1b

The result should be 123456

Can any one suggest how this can be done in cobol


1. Learn how to use the Code button when posting your questions.

2. What do you know about COBOL? Out of 2 short code fragments in your message, none of them is a correct COBOL code.

Re: Skip last 3 bytes and first 3 bytes of data in cobol

PostPosted: Thu Dec 22, 2022 9:18 am
by Robert Sample
Reference modification.