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

UNSTRING problem


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

New User


Joined: 20 Sep 2018
Posts: 6
Location: INDIA

PostPosted: Tue Oct 09, 2018 4:51 pm
Reply with quote

Hi Robert,

Can you please suggest how to resolve the above probelm? What needs to be done if after 1st unstring it causes ON OVERFLOW condition.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 09, 2018 5:30 pm
Reply with quote

First, you need to understand that this is NOT a problem -- it is the way UNSTRING works!

Second, what needs to be done ON OVERFLOW depends upon the application. Sometimes, the application just wants the first (or first few) field(s) so the ON OVERFLOW can be ignored. Sometimes, the application needs all the data fields and hence a loop would be needed to UNSTRING the first field, move the remaining bytes over, and then repeating the UNSTRING until ON OVERFLOW no longer occurs. If there are a variable number of fields to be discovered, UNSTRING is not a great choice -- reference modification would probably be a better choice as it is less restrictive in how it works.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue Oct 09, 2018 7:19 pm
Reply with quote

Apurva, Please start a new post next time instead of replying to any older post.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 09, 2018 8:02 pm
Reply with quote

I've split the topic from ibmmainframes.com/viewtopic.php?t=51383
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 Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top