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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm


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