thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
A Clarification in Sort.
My Requirement:
When a input file is empty(without any records),
can we create a control file for this empty file
The output format:
Date, RecordCount Amount Field
2005-08-1200000000000000 0
If a file is having atleast one record, we are able to create a control
file for this.
When intput file in empty, INREC and OUTREC are not working. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You didn't give me enough details for me to give you a complete answer. INREC and OUTREC do not produce any records when the input file is empty. But OUTFIL TRAILER1 can be used to produce a trailer record even when the input file is empty, e.g.
Code: |
OUTFIL REMOVECC,
TRAILER1=(DATE=(4MD-),COUNT=(M11,LENGTH=14),...)
|
If you only want the trailer record (no detail records), change the statement to:
Code: |
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(DATE=(4MD-),COUNT=(M11,LENGTH=14),...)
|
I don't know what your Amount field represents or what you want the complete output file to look like. If you need more specific help, you'll need to supply more details about what you're trying to do in both the non-empty and empty cases. |
|