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
 

 

Printing Number of Records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Printing Number of Records
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: 2163
Location: @my desk

PostPosted: Tue Nov 30, 2010 10:10 am    Post subject:
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

Site Director


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

PostPosted: Tue Nov 30, 2010 10:11 am    Post subject:
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    Post subject: Retreiving first 5000 records from a dataset.
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

Site Director


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

PostPosted: Tue Nov 30, 2010 10:46 am    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Nov 30, 2010 11:42 am    Post subject: Reply to: Printing Number of Records
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

Senior Member


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

PostPosted: Tue Nov 30, 2010 1:57 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Nov 30, 2010 2:04 pm    Post subject:
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 Moderator


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

PostPosted: Wed Dec 01, 2010 2:33 am    Post subject:
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:

http://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    Post subject: Reply to: Printing Number of Records
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    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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 1 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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