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
 

 

overflow condition in unstring

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

New User


Joined: 07 Jun 2007
Posts: 15
Location: chennai

PostPosted: Thu Jun 19, 2008 12:38 pm    Post subject: overflow condition in unstring
Reply with quote

Hi,

If the number of source variables are greater than the number of destination variables declared and "ON OVERFLOW" or "NOT ON OVERFLOW " is not specified .then whether the prgram gets abended or it will populate the last destination variable with the entire left out part of the string .

ex:

UNSTRING FullName DELIMITED BY ALL SPACES
INTO FirstName, SecondName, Surname
END-UNSTRING.

Full name = "John Joseph Ryan chennai"

first name = john
second name = joseph
surname= ryan

wht abt "chennai"???
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Thu Jun 19, 2008 12:43 pm    Post subject: Reply to: overflow condition in unstring
Reply with quote

do You have access to a compiler to test or You are just studying the manual?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 19, 2008 12:44 pm    Post subject:
Reply with quote

Hello,

I suggest you run a simple test and see.

IIRC, when the last receiving field is processed, the unstring stops. There is no error raised. The remaining data is not processed (as i said iirc).
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Jun 19, 2008 3:11 pm    Post subject: Reply to: overflow condition in unstring
Reply with quote

anil,

Quote:
Full name = "John Joseph Ryan chennai"

first name = john
second name = joseph
surname= ryan

wht abt "chennai"???


You will lose "chennai" when that unstring is done. it would not populate "Ryan Chennai" in the surname field.

what actually is u r requirement? If you want chennai to be populated in surname then you will have to do the following.



Code:
Perform UNTIL a flag
      replace the first "space" with "\"
     unstring the data into 2 parts delimited by "\"
     check the fucnctionality and set the flag when the 2 part is spaces


By this youi can check dynamically incresing the performance and not losing the data.
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 ESQA overflow - high ECSA utilization vasanthz All Other Mainframe Topics 1 Thu Dec 29, 2016 7:06 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
No new posts Pool Overflow in Mainframe ADABASE polymathtarun Java & MQSeries 4 Fri Jun 03, 2016 11:57 am


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