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
 

 

What is the use of cobol scope terminator STRING END-STRING?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
niharika1234

New User


Joined: 01 May 2006
Posts: 9

PostPosted: Tue May 02, 2006 2:28 pm    Post subject: What is the use of cobol scope terminator STRING END-STRING?
Reply with quote

HI All!

What is the use of cobol scope terminator STRING END-STRING?
And what does the following code mean?

Code:
STRING 'OPEN DATEFILE ERROR, FILE STATUS = '
                                                       DELIMITED BY SIZE
             WS-DATEFILE-FILE-STATUS  DELIMITED BY SIZE
     INTO SPZC-TEXT1
END-STRING

Thanks..................
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue May 02, 2006 2:52 pm    Post subject: Re: What is the use of cobol scope terminator STRING END-STR
Reply with quote

niharika,

STRING is a COBOL verb, you can use to merge two or more strings to one.

END-STRING, as you already said, is scope terminator for the corresponding STRING verb, which makrs an end of the statement too there.

The code you mentioned will join the two strings resulting into SPZC-TEXT1.

Thus SPZC-TEXT1 would be having 'OPEN DATEFILE ERROR, FILE STATUS = ' and value of WS-DATEFILE-FILE-STATUS in it.

Regards,
Priyesh.
Back to top
View user's profile Send private message
niharika1234

New User


Joined: 01 May 2006
Posts: 9

PostPosted: Tue May 02, 2006 2:55 pm    Post subject:
Reply with quote

Priyesh!

what does "DELIMITED BY SIZE " mean?
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue May 02, 2006 3:01 pm    Post subject: Re: What is the use of cobol scope terminator STRING END-STR
Reply with quote

Quote:
what does "DELIMITED BY SIZE "?


DELIMITED BY SIZE specifies:
All the contents of source-string would be moved to destination-string in the same sequence in which they appear in the statement.
Data movement begins with the leftmost character and continues to the right, character by character.
Data movement ends when the STRING operation has transferred all data in each source-string or reaches the end of dest-string

For a complete information on STRING statement, you can also visit MANUALS...

Regards,
Priyesh.
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 RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


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