How can the FUNCTION LENGTH intrinsic function be used to determine the length of a string in COBOL?
- FUNCTION LENGTH OF STRING-NAME
- FUNCTION LENGTH OF STRING-NAME RETURNING LENGTH-VARIABLE
- FUNCTION LENGTH STRING-NAME
- FUNCTION LENGTH(STRING-NAME)
The correct syntax for using FUNCTION LENGTH to determine the length of a string in COBOL is FUNCTION LENGTH OF STRING-NAME RETURNING LENGTH-VARIABLE. It returns the length of the specified string into the LENGTH-VARIABLE.
Loading...
Related Quiz
- In COBOL, _______ locks allow multiple users to read a file simultaneously, but only one user can write to it.
- You are tasked with parsing and modifying a text field in a COBOL program. Which COBOL statement can help you achieve this?
- You are tasked with processing sales transaction data, and some transactions may be recorded twice due to system glitches. How would you ensure that such duplicate transactions are detected and managed correctly?
- What is the purpose of using records and structures in COBOL?
- The ________ clause in the FILE CONTROL paragraph is used to specify the organization of a file.