Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 757
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us