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

What happens if we try to sort an empty file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
reachcyrus

New User


Joined: 13 Jul 2007
Posts: 24
Location: chennai

PostPosted: Tue Jul 31, 2007 3:46 pm
Reply with quote

What happens if we try to sort an empty file ?
cheers!!
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jul 31, 2007 4:33 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Tue Jul 31, 2007 4:37 pm
Reply with quote

Hi,

If file is with proper EOF marker, SMS managed QSAM file, SORT will give an empty file in output.
Back to top
View user's profile Send private message
reachcyrus

New User


Joined: 13 Jul 2007
Posts: 24
Location: chennai

PostPosted: Tue Jul 31, 2007 5:22 pm
Reply with quote

How to check EOF marker ??
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Jul 31, 2007 5:32 pm
Reply with quote

reachcyrus wrote:
How to check EOF marker ??
If the file got opened for output, there is an "EOF marker".
DITTO?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 31, 2007 8:20 pm
Reply with quote

Quote:
What happens if we try to sort an empty file ?


You'll get an empty output file.
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 Aug 01, 2007 1:16 am
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
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
Search our Forums:

Back to Top