View previous topic :: View next topic
|
Author |
Message |
reachcyrus
New User
Joined: 13 Jul 2007 Posts: 24 Location: chennai
|
|
|
|
What happens if we try to sort an empty file ?
cheers!! |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
reachcyrus wrote: |
What happens if we try to sort an empty file ?
cheers!! |
Kidding? Serious?
The file will get sorted and written to the output file in the correct sequence....
Why do you think anything else will happen? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
If file is with proper EOF marker, SMS managed QSAM file, SORT will give an empty file in output. |
|
Back to top |
|
|
reachcyrus
New User
Joined: 13 Jul 2007 Posts: 24 Location: chennai
|
|
|
|
How to check EOF marker ?? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
reachcyrus wrote: |
How to check EOF marker ?? |
If the file got opened for output, there is an "EOF marker".
DITTO? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
What happens if we try to sort an empty file ? |
You'll get an empty output file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
When you read this empty file into your program, your program will raise the "AT END" condition on the first read. Your program needs to consider that there may be zero input records and handle this accordingly.
You don't code to check for "an EOF marker". |
|
Back to top |
|
|
|