View previous topic :: View next topic
|
Author |
Message |
jaffarhussain
New User
Joined: 26 Nov 2010 Posts: 30 Location: Hyderabad
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
jaffarhussain
New User
Joined: 26 Nov 2010 Posts: 30 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
jaffarhussain
New User
Joined: 26 Nov 2010 Posts: 30 Location: Hyderabad
|
|
|
|
CAn i get the code snippet of solving this !!! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
jaffarhussain
New User
Joined: 26 Nov 2010 Posts: 30 Location: Hyderabad
|
|
|
|
Thank you i have don it through INSYNC and got the problem solved |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Good to know that - have a good one, |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
jaffarhussain
New User
Joined: 26 Nov 2010 Posts: 30 Location: Hyderabad
|
|
|
|
Thanks a Lot for the information !!! |
|
Back to top |
|
|
|