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 find a job list whether the file is Empty or not?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 78
Location: india

PostPosted: Fri Aug 13, 2010 6:03 pm    Post subject: How to find a job list whether the file is Empty or not?
Reply with quote

My requirement:
I have a lot of jobs/programs in my application.
i need to identify the list of jobs/cobol programs that cann't process empty file if received at any time. How to findout or search? can we search through any keyword in the jobs/programs?
Once After getting the list of jobs/programs, then how to fix it without abending.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 13, 2010 6:17 pm    Post subject:
Reply with quote

Jobs don't process files -- jobs just run programs. Programs may or may not handle empty files. You can find out by code inspection (that is, manually looking at the code), or by the pragmatic approach of running an empty file through the program and see what happens. As far as I am aware, there is no key word to search to determine this as it is entirely and totally dependent upon the program logic.

As far as fixing it goes, you change the code to make it do whatever you want.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Aug 13, 2010 6:18 pm    Post subject:
Reply with quote

??
when you mean empty file, do you mean allocated but not open and closed
or open and closed with no records.
those are two different things.

test everything under both circumstances?
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: Fri Aug 13, 2010 9:11 pm    Post subject:
Reply with quote

Hello,

There is much testing to be done. . .

Once the "empty file test" test has been done for a program, the code may need to be modified to handle the empty file(s). Seems like one of 3 results might happen:
1. Code works properly.
2. Code abends.
3. Code executes, but does not properly handle the empty file(s).

2 & 3 require code modification - there is no generic solution. Proper "empty file" information needs to be added to the code and a return-code set or a User Abend issued.

And then the modified code must be promoted to Production.
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Sat Aug 14, 2010 10:22 am    Post subject:
Reply with quote

One more thing to add,
When you get an empty file and when first read is EOF in your program, then you can set RETURN-CODE to 02 or 03 (which is not system generated) in cobol program and then the downstream step will run based on your business logic (you want to run or no). This according to me will help the support guy.
Back to top
View user's profile Send private message
santy
Warnings : 1

New User


Joined: 19 Jul 2007
Posts: 22
Location: mumbai

PostPosted: Tue Aug 17, 2010 10:45 am    Post subject: Reply to: How to find a job list whether the file is Empty o
Reply with quote

to check an empty file in your program, u have to use an logic to do that each time whenever you get an file.

once u get an file then check the file is empty or not.
Read the file.
IF first read is EOF
then file is empty
Else
file is not empty.
do your rest of program.
End-if.


this logic will run every time whenever you open a new file.

Hope this logic will help you as solution for ur query.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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