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

Printing Number of Records


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Tue Nov 30, 2010 10:01 am
Reply with quote

I have a task of printing first 5000 records from a GDG file .
So i have to do this by using JCL with Count as hint given.
So anyone can help me out with the code as I searched for count and doesnot understand the syntax and explanation.
Or any relevant link of this task to get the solution.
Thanks in Advance,

[/b]
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Nov 30, 2010 10:10 am
Reply with quote

Jaffar Hussain,

Welcome to the forums.

Quote:
i have to do this by using JCL
Once again the task has to be achieved using JCL!!!. JCL does nothing on its own. You need to execute a program or utility to get your work done.

It's not clear what you're trying to achieve. Are you trying to 'PRINT' records using a printer?

There are numerous working examples in this forum which does count or skip records and write into output.
If you dont understand them, I would suggest reading your product manuals.
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: Tue Nov 30, 2010 10:11 am
Reply with quote

Hello and welcome to the forum,

You need to ask the person who gave the assignment for clarification.

What you want to do cannot be done with JCL. JCL only executes programs, so some program needs to be run to get what you want.

Do not let the GDG influence your (or their) choice of a utility. Your requirement will read a sequential file and it will not really matter if the file is part of a GDG or not.

Which utility do you intend to use?
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Tue Nov 30, 2010 10:36 am
Reply with quote

A dataset is given to us which contains millions of records .
The task is to retreive only first 5000 records and copy it in a new dataset.
So how can we do this.
Any utility is available ? if so which one and link needed if possible.
Can we do this by sort card using count verb?
If possible please give me hint of logic and syntax of the code.
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: Tue Nov 30, 2010 10:46 am
Reply with quote

Hello,

Yes, the sort can be used. Which sort product is used on the system?

If it is DFSORT, there are examples in the DFSORT part of the forum. If it is Syncsort, there are examples in the JCL part of the forum (there is not a separate part of the forum for Syncsort).
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Tue Nov 30, 2010 11:05 am
Reply with quote

CAn i get the code snippet of solving this !!!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 30, 2010 11:42 am
Reply with quote

Quote:
So anyone can help me out with the code as I searched for count and doesnot understand the syntax and explanation.


Quote:
CAn i get the code snippet of solving this !!!

it is improper to solicit after one hour of the initial post
replying is on voluntary basis
on the responders time
free of charge
so You should not expect that things should happen according to Your time constraints icon_evil.gif

this is a help forum not a give it to me when I pester people!
so keep Your calm and reply to our question!

the burden of getting help is more on the person who asks rather than on the responder

JCL as said zillions of times does nothing...
You need to run a PROGRAM

what program/utility are You supposed to use ?
You tell and we shall reply accordingly !

if You intend to use sort run this job to let us know which level of sort You are running
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*
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 Nov 30, 2010 1:57 pm
Reply with quote

Okay - It's Tuesday and I'm just starting with work...File-Aid, if available, can be one of the choices for this task - online or batch, your choice!
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Tue Nov 30, 2010 2:01 pm
Reply with quote

Thank you i have don it through INSYNC and got the problem solved
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 Nov 30, 2010 2:04 pm
Reply with quote

Good to know that - have a good one, icon_smile.gif
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: Wed Dec 01, 2010 2:33 am
Reply with quote

Jaffar Hussain,

FYI, you can use a DFSORT job like the following to copy the first 5000 records:

Code:

//S1 EXEC PGM=SORT                                             
//SYSOUT DD SYSOUT=*         
//SORTIN DD DSN=...  input file                                 
//SORTOUT DD DSN=...  output file
//SYSIN DD *                                                   
  OPTION COPY,STOPAFT=5000                                                 


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
jaffarhussain

New User


Joined: 26 Nov 2010
Posts: 30
Location: Hyderabad

PostPosted: Wed Dec 01, 2010 10:16 am
Reply with quote

Thanks a Lot for the information !!! icon_smile.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
Search our Forums:

Back to Top