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
 

 

How to check for Beginning of a file

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

New User


Joined: 12 Jun 2008
Posts: 8
Location: Bangalore

PostPosted: Thu Mar 05, 2009 11:02 am    Post subject: How to check for Beginning of a file
Reply with quote

Hi all,

I have a requirement like this. I have started reading a file from the beginning. Say i am in 10th record after some processing. Now I wish to go back and read from the beginning again. Is this possible?

Your help is appreciated!
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 Mar 05, 2009 11:16 am    Post subject:
Reply with quote

Hello,

Quote:
Now I wish to go back and read from the beginning again.
You probably dont want to go back and read the beginning all over again.

Please describe your process and which part of this process requires re-reading some or all of the input.

This is definitely not an acceptable approach for matching 2 files.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 755
Location: Germany

PostPosted: Thu Mar 05, 2009 1:20 pm    Post subject:
Reply with quote

Morning Sir !

But if you really want to do this, for whatever reason, just close the file and open it ones more and start reading
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 Mar 05, 2009 8:56 pm    Post subject:
Reply with quote

Hello,

Suggest you do NOT close/open the file until the requirement is better understood. . .

FWIW - the last several times someone asked how to do this, they intended to "start back at the beginning" so they could match 2 files. Probably the worst possible way to implement such a requirement.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Fri Mar 06, 2009 3:32 pm    Post subject:
Reply with quote

I remember i had a similar requirement . To avoid multible start browse and going forward and going backwards , what i did was put all the required variables of each record in a array . Then used this array for processing . But array is only effective for small amount of data and other constraints are there which can be cleared once Prema gives the full requirements.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 06, 2009 4:49 pm    Post subject:
Reply with quote

Hi,

I've to vote-in for Dick ... icon_smile.gif
Quote:
Suggest you do NOT close/open the file until the requirement is better understood. . .
What is posted so far by OP may be a way to achieve what s/he wants but not the optimum way for sure. Once the requirement is understood ..some one will be around with a better suggestion.. icon_smile.gif
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Wed Mar 11, 2009 5:34 pm    Post subject:
Reply with quote

Should agree with above posts.

I think the solution would be some thing like this. Sort the file based on the field that is used for mathcing and then just use less than or greater than condition to browse through the file.

I am sorry if I misunderstood the requirement.

Can you elaborate on it if this problem is still open.
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


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