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
 

 

What happens if we try to sort an empty file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: What happens if we try to sort an empty file
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: 3158
Location: Tucson AZ

PostPosted: Tue Jul 31, 2007 4:33 pm    Post subject: Re: What happens if we try to sort an empty file
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

Senior Member


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

PostPosted: Tue Jul 31, 2007 4:37 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Jul 31, 2007 5:32 pm    Post subject:
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 Moderator


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

PostPosted: Tue Jul 31, 2007 8:20 pm    Post subject:
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

Site Director


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

PostPosted: Wed Aug 01, 2007 1:16 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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