IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Difference bw DELIMITED bY SIZE and bY SPACE


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guruguha

New User


Joined: 02 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Wed May 16, 2007 5:33 pm
Reply with quote

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
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed May 16, 2007 5:50 pm
Reply with quote

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
View user's profile Send private message
pcoreddy

New User


Joined: 14 Mar 2007
Posts: 24
Location: Mysore

PostPosted: Wed May 16, 2007 5:57 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
Search our Forums:

Back to Top