Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Difference betweeen DELIMITED BY SIZE and DELIMITED BY Space

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Difference betweeen DELIMITED BY SIZE and DELIMITED BY Space
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    Post subject:
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    Post subject: Re: String delimited
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us