Inspect
Moderator: Moderator Group
-
- Member
- Posts: 7
- Joined: Mon Jun 23, 2014 1:45 pm
Inspect
Hi
Can anybody tell How to replace
'I love my country' with 'I love my India' with Inspect verb
Thanks
Raj
Can anybody tell How to replace
'I love my country' with 'I love my India' with Inspect verb
Thanks
Raj
-
- Member
- Posts: 7
- Joined: Mon Jun 23, 2014 1:45 pm
-
- Member
- Posts: 7
- Joined: Mon Jun 23, 2014 1:45 pm
-
- Member
- Posts: 7
- Joined: Mon Jun 23, 2014 1:45 pm
Hi Terry,
Can you please clarify my doubt. Its an Interview question.
I want to replace string with another using Inspect verb. Below is the requirement.
'I love my country' as 'I love my India'
Tell me whether it is possible, in case of source string and target string lengths are different. If possible please reply me the answer.
Thanks,
Raj
Can you please clarify my doubt. Its an Interview question.
I want to replace string with another using Inspect verb. Below is the requirement.
'I love my country' as 'I love my India'
Tell me whether it is possible, in case of source string and target string lengths are different. If possible please reply me the answer.
Thanks,
Raj
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Member
- Posts: 7
- Joined: Mon Jun 23, 2014 1:45 pm
Hi Collins,
Thanks for your reply, while going through manuals only I found some interesting thing like 'Inspect with replacing option' this option replaces a character or group of characters right.
In our case 'country' is nothing but group of chars right, so is this possible to convert to 'India'
Please explain.
Thanks
Thanks for your reply, while going through manuals only I found some interesting thing like 'Inspect with replacing option' this option replaces a character or group of characters right.
In our case 'country' is nothing but group of chars right, so is this possible to convert to 'India'
Please explain.
Thanks
-
- Member
- Posts: 7
- Joined: Mon Jun 23, 2014 1:45 pm
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
In COBOL we have fixed-length fields, or fields whose size is determined by a numeric value.
We do not have fields which are terminated, a field whose current length depends upon its content up to the terminator. We don't have strings.
We have STRING and UNSTRING, but so what? The values which are put together (STRING) are sourced from fixed-length fields, and the values which are separated are placed in fixed-length fields. Fixed-length (alpha or alphanumeric) fields are always space padded to the right with space when content is less than length, not ended with a terminator value.
We do not have fields which are terminated, a field whose current length depends upon its content up to the terminator. We don't have strings.
We have STRING and UNSTRING, but so what? The values which are put together (STRING) are sourced from fixed-length fields, and the values which are separated are placed in fixed-length fields. Fixed-length (alpha or alphanumeric) fields are always space padded to the right with space when content is less than length, not ended with a terminator value.
-
- Member
- Posts: 7
- Joined: Mon Jun 23, 2014 1:45 pm
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page