View previous topic :: View next topic
|
Author |
Message |
surya anem
New User
Joined: 20 Dec 2007 Posts: 54 Location: Hyderabad
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
surya anem
New User
Joined: 20 Dec 2007 Posts: 54 Location: Hyderabad
|
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
surya anem
New User
Joined: 20 Dec 2007 Posts: 54 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
|