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

NDM - Avoid sending Empty file (Just header and trailer)


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Wed Jun 08, 2011 4:01 pm
Reply with quote

Hi,

I have a job J1 which creates file F1 with Header trailer and detail records.
Once this job completes successfully it triggers a connect direct job J2 which will transfer the file to another server.

Now, the requirement is, if the File F1 has just header and trailer (with no detail records), the connect direct job should not transfer this file to the other server.

can you please help me with how to acheive this.

Thanks
Surya
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 08, 2011 4:26 pm
Reply with quote

Search the forum to find out how to determine if a file has more or less than a certain number of records.

Been discussed gazillions of times. And there lies your answer.

CLUES = IDCAMS or SORT
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Jun 08, 2011 4:27 pm
Reply with quote

Hello,
You could have a sort step before the NDM step and make the sort step set a return code if the file has only 2 records(header & trailer) and then handle the return code on NDM step.
Back to top
View user's profile Send private message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Wed Jun 08, 2011 4:46 pm
Reply with quote

Thanks Vasanthz.

Expat, thank you. I got the answer from one of your posts.

ibmmainframes.com/about45379.html
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Jun 08, 2011 5:08 pm
Reply with quote

How will the receiving system know the difference between not receiving an empty file and not receiving a good file due to any number of possible other situations?

A robust system will expect to receive a file every day and know how to handle an empty file.

Accountability.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 08, 2011 7:57 pm
Reply with quote

Hello,

Quote:
A robust system will expect to receive a file every day and know how to handle an empty file.
Or at least be able to handle a file with an entry that specifies "No Data This Run". . .

The process that creates the file to be transmitted "knows" if there is data or not and could easily write a "No Data" record. Then the NDM would always run and the receiving system would always have a current fle to process.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jun 08, 2011 8:04 pm
Reply with quote

I'm with Phr.. Phil.

You have a header and trailer indicating an empty file. Much better to transfer that so that the receiving system can know the situation for certain and act accordingly. Business data, system date/time on the header. Clearly identifiable as header. Record count and maybe some sort of "hash" count on the trailer. Clearly identifiable as trailer.

What are you actually going to do when you don't send the file? Send an e-mail automatically? Then ring them up to confirm they received the e-mail, so they can manually do whatever necessary to not run this-and-that today, but to remember to run the-other?

Give them the header/trailer validly indicating no content. It's called "computerisation".
Back to top
View user's profile Send private message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Thu Jun 09, 2011 9:02 am
Reply with quote

The file is being sent to the server where there is a failure due to empty file which is resulting in some alert being generated and hence an additional cost (I am not sure what exactly is the process at the receiving end).

So the sending system was asked to suppress sending any empty files (With header and trailer alone) to them.

Thanks
Surya
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 09, 2011 9:10 am
Reply with quote

Hello,

Quote:
The process that creates the file to be transmitted "knows" if there is data or not and could easily write a "No Data" record. Then the NDM would always run and the receiving system would always have a current fle to process.


The NDM step could be modified to not execute when there is no data. . . Setting a return code when there is no data could support this. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Jun 09, 2011 9:13 pm
Reply with quote

surya anem wrote:
So the sending system was asked to suppress sending any empty files (With header and trailer alone) to them.
Usually such things are under time-level-SLAs. What if some day file got delayed, and the receving end has time-driven process/es, you should consider this also as one of the thoughts, among many which have been already suggested to. Batch delays are common(if not much) at zOS shops.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top