| 1 |
>> PUSH source format |
| 2 |
>>SOURCE format is fixed |
| 3 |
|
| 4 |
* This function is in public domain. |
| 5 |
* Contributed by James K. Lowden of Cobolworx in August 2024 |
| 6 |
|
| 7 |
Identification Division. |
| 8 |
Function-ID. STORED-CHAR-LENGTH. |
| 9 |
Data Division. |
| 10 |
Linkage Section. |
| 11 |
01 Candidate PIC X Any Length. |
| 12 |
77 Output-Value PIC 9(8) COMP-5. |
| 13 |
|
| 14 |
Procedure Division using Candidate RETURNING Output-Value. |
| 15 |
Move Function Length( Function Trim(Candidate) ) |
| 16 |
to Output-Value. |
| 17 |
End Function STORED-CHAR-LENGTH. |
| 18 |
|
| 19 |
>> pop source format |