Will the variable POS in the following code have a value of
2 or not?
01 POS PIC S9(4) COMP VALUE 2.
01 FIRST-NAME PIC X(10) VALUE 'ABC'.
01 LAST-NAME PIC X(10) VALUE 'XYZ'.
01 NAME PIC X(20) VALUE SPACES.
STRING FIRST-NAME DELIMITED BY SPACES
' ' DELIMITED BY SIZE
LAST-NAME DELIMITED BY SPACES
INTO NAME
WITH POINTER POS
Answers were Sorted based on User's Feedback
Answer / shobhit garg
No, It wont have value 2. rather value of POS will be 9.
Pointer specifies the number of non blank characters moved
to the receiveing string ( in our case its NAME).
So FIRST-NAME will return 3 bytes then a space then LAST-
NAME will return 3 bytes means overall 7 bytes.
Since our POS varibale starts from 2 , so overall count for
POS will be 2 + 7 = 9
Is This Answer Correct ? | 7 Yes | 0 No |
i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk values pls say how to do ths reply fast
Give some advantages of REDEFINES clause?
Can we move SPACES to numeric field and ZEROES to alphabetic field? If yes what are the way doing this?
What is the meaning of 'Eject' verb in cobol?
What is the local-storage section?
What are the differences between COBOL and COBOL II?
77 I pic 99 value 5 Perorm para-A I times. Para -A. move 10 to I. How many times the para-A will be executed.?
how we can edit records in vsam data set and non vsam data sets
what is the difference between Plan & package
i need a small 3d program using inline and outline.
How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.
Explain what you understand by passing by value.