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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: NDM - Avoid sending Empty file (Just header and trailer)
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 08, 2011 4:26 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed Jun 08, 2011 4:27 pm    Post subject:
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    Post subject:
Reply with quote

Thanks Vasanthz.

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

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

Active Member


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

PostPosted: Wed Jun 08, 2011 5:08 pm    Post subject:
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

Site Director


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

PostPosted: Wed Jun 08, 2011 7:57 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Wed Jun 08, 2011 8:04 pm    Post subject:
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    Post subject: Reply to: NDM - Avoid sending Empty file (Just header and tr
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

Site Director


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

PostPosted: Thu Jun 09, 2011 9:10 am    Post subject:
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

Senior Member


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

PostPosted: Thu Jun 09, 2011 9:13 pm    Post subject: Re: Reply to: NDM - Avoid sending Empty file (Just header an
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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