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
 

 

Displays after EOF not working

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Gayathri P

New User


Joined: 07 Oct 2011
Posts: 16
Location: India

PostPosted: Tue Jun 26, 2012 4:03 pm    Post subject: Displays after EOF not working
Reply with quote

hi , I am reading a Sequential file in Eazytrieve . After each record is read
am checking EOF , if EOF is reached trying to display some values. But am not getting these Displays even after the EOF is reached .

Impacted code :

Job input file1

If EOF file1
display 'bye'
STOP
else
display 'hi'
end-if


Whereas the displays are working when given in FINISH module

Job input file1 finish sr-finish

sr-finish. proc

display 'bye'

end-proc



Can anyone help me with an answer for why it dint work in the first place but in the later??
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Jun 26, 2012 4:07 pm    Post subject: Reply to: Displays after EOF not working
Reply with quote

You are never going to get EOF in the body of the code with automatic file processing (JOB INPUT filename).

Code a FINISH procedure for what you want to do after file has ended.

It's all in the manual.

And post in the CA part of the forum next time, please.
Back to top
View user's profile Send private message
Gayathri P

New User


Joined: 07 Oct 2011
Posts: 16
Location: India

PostPosted: Tue Jun 26, 2012 4:14 pm    Post subject:
Reply with quote

Thanks for your reply , will post in CA for next new-topic.

As I mentioned I had already adopted FINISH method of displaying .
Am asking for the explanation you could help me with . If not I would like to know which manual you refer to .

thanks in advance
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Jun 26, 2012 4:17 pm    Post subject: Reply to: Displays after EOF not working
Reply with quote

There is a big difference between

Code:
JOB INPUT NULL

and

JOB INPUT filename


With the former you have to obtain the records and cause the processing to cease when you know there are no more records. So you test for EOF and use STOP. STOP causes the FINISH procedure to be executed.

With the latter, Easytrieve does all the processing and does an implicit STOP at end of file for your input file. So you never get to see EOF for the automatic input as Easytrieve has already done the implied STOP.

EDIT: As to the manual, you should be able to locate one if your site is licensed to use the product. There is a Reference (most useful) and a User Guide and other bits and pieces that exist but which your site may not use or may not let you have access to.
Back to top
View user's profile Send private message
Gayathri P

New User


Joined: 07 Oct 2011
Posts: 16
Location: India

PostPosted: Tue Jun 26, 2012 4:22 pm    Post subject:
Reply with quote

I got it .. thanks for your Help icon_smile.gif
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: Tue Jun 26, 2012 11:19 pm    Post subject:
Reply with quote

Hello,

If your organization is licensed to use the product, all of the material may be downloaded free from CA Support.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 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 SCRNAME not working on my mainframe? mrsidhu12 TSO/ISPF 7 Thu Sep 01, 2016 2:17 pm
No new posts 2 same CLIST pgm but with different n... boyti ko CLIST & REXX 5 Fri Jun 03, 2016 4:55 pm
No new posts REXX Screen not working due to LINKED... sundarkudos CLIST & REXX 1 Mon May 09, 2016 1:44 pm


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