Hello,
Can any one help me understand this logic to find the length of the SYSIN parameter in COBOL program
Code:
CALCULATE-TEXT-LENGTH
add 1 to ZERO giving IX-1
inspect SYSIN-PARAMETER replacing all LOW-VALUES by SPACES
perform 80 times
if SYSIN-PARAMETER(IX-1:1) not = SPACE
add IX-1 to ZERO giving SYSIN-LENGTH
end-if
add 1 to IX-1
end-perform
exit.
What my understanding is
1. We read SYSIN data from JCL into a Working storage variable of length 80.
2. After we read the SYSIN into the WS varaible, why will it have low values. As the code says
Code:
inspect SYSIN-PARAMETER replacing all LOW-VALUES by SPACES
Infact it should have spaces that too at random places.
if the sysin is a true sysin
- card_image/text data created with an editor
there is no reason to have low values in it there should be only printable chars