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
 

 

Arriving at junk values in my file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nithivenkat

New User


Joined: 15 Sep 2008
Posts: 22
Location: Mumbai

PostPosted: Sat Nov 14, 2009 6:13 pm    Post subject: Arriving at junk values in my file
Reply with quote

Hi,

My file has first 3 records as header.
Say for example if the total records in my file is 10, then the first 3 records will be headers and the remaining 7 will be detail records.

Now in my JCL - sortparm I have to extract only the detail records which will be processed in my cobol program.

Since we are not sure of the data in the header, we are simply skipping the first 3 records like below.
SORT FIELDS=COPY,SKIPREC=3
END
The output of this file (generated based onabove sort) is used in my cobol program.

My program does a check if the input file is empty [in the sense if the original input file has only headers and are skipped] it should abend. But it is not abending because of some junk being present. Can some one help me how to resolve this problem.

Kindly advise.
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1474
Location: Chennai

PostPosted: Sat Nov 14, 2009 6:52 pm    Post subject:
Reply with quote

Hi,

Can you show us how the input file looks like & the scenarios.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Nov 14, 2009 8:01 pm    Post subject:
Reply with quote

Define junk
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Nov 14, 2009 10:12 pm    Post subject:
Reply with quote

and why are you wasting resouces to delete 3 records from a file,
that could be skipped by the cobol program.

and what do you mean by ABEND?

If you keep the 3 headers in the file,
that means the COBOL program will always have a file to read,
and starting with the 4th read, if end of file, issue a non-zero return code.

If you are using the old rookie trick of forcing an abend in a module,
you are again (second time) wasting resources.
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: Sat Nov 14, 2009 10:13 pm    Post subject:
Reply with quote

Hello,

Quote:
Can some one help me how to resolve this problem.
Maybe. . . You need to post more complete information.

As Expat mentioned - define junk.

As Vasanth requested - show the input data and post the rules.

You need to post the jcl and control statements and mention what abbend is happening.

If you won't post much, we can't help much. . .
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 -> JCL & VSAM 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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
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 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