View previous topic :: View next topic
|
Author |
Message |
guruguha
New User
Joined: 02 Apr 2007 Posts: 12 Location: Chennai
|
|
|
|
I want to know the difference betweeen DELIMITED BY SIZE and DELIMITED BY ' ' (space).
for eg: the piece of code is:
STRING PTMS-CDS-SYSTEM-ID DELIMITED BY SIZE
'?' DELIMITED BY SIZE
PTMS-CDS-LESSOR DELIMITED BY SIZE
'?' DELIMITED BY SIZE
PTMS-CDS-DIVISION-CODE DELIMITED BY SIZE
'?' DELIMITED BY SIZE
PTMS-CDS-GL-CODE DELIMITED BY SIZE
'?' DELIMITED BY SIZE
PTMS-CDS-COMPANY-CODE DELIMITED BY ' '
'?' DELIMITED BY SIZE
PTMS-CDS-COMPANY DELIMITED BY ' '
INTO WS-OUT-PTMS-CODES-OUT.
Since this is different for another file in the same, program, I am getting confused.
Please explain in detail the meaning of the syntax.
Thanks,
Karthikeyan. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Quote: |
difference betweeen DELIMITED BY SIZE and DELIMITED BY ' ' (space). |
DELIMITED BY SIZE - Actual size of data item will be considered as delimiter
DELIMITED BY ' ' (SPACES) - In the sting as soon as SPACE is encountered that is considered as delimiter.
Quote: |
Please explain in detail the meaning of the syntax. |
For more explanation you can refer to Quick Ref or COBOL manual. |
|
Back to top |
|
|
pcoreddy
New User
Joined: 14 Mar 2007 Posts: 24 Location: Mysore
|
|
|
|
77 ws-variable pic x(11) value 'chandrareddy'
77 ws-var2 pic x(15)
STRING ws-variable DELIMITED BY SIZE INTO ws-var2
the ws-variable enire data will be transfed to ws-var2 from left to right untill right most char moved .
STRING ws-variable DELIMITED BY 'd' INTO ws-var2
the ws-variable data will be transfed to ws-var2 from left to right untill find the char d |
|
Back to top |
|
|
|