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
 

 

help me with this query

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

New User


Joined: 12 Jun 2005
Posts: 28
Location: Hyderabad

PostPosted: Thu Jul 28, 2005 12:25 pm    Post subject: help me with this query
Reply with quote

morning i have submitted a program which contains 100 records. i have sorted these records.

in the evening i have run another program which takes the input as 100 records from the morning program and additionally it takes another 40 records as input. The output of this program is a sorted order of the morning 100 records and the other 40 records which i have additionally added in the evening.

Now i want the records which i have given as input in the evening
i.e, the new 40 records. how to retrieve these new 40 records from the sorted file. How to do it with a JCL and a cobol program.
Back to top
View user's profile Send private message

Prandip

New User


Joined: 04 Mar 2005
Posts: 85
Location: In my tiny cubicle ...

PostPosted: Thu Jul 28, 2005 6:14 pm    Post subject: Re: help me with this query
Reply with quote

... and how do you identify those 40 records? What makes them unique that can logically be used to retrieve them from the larger file?
Back to top
View user's profile Send private message
ipavan

New User


Joined: 12 Jun 2005
Posts: 28
Location: Hyderabad

PostPosted: Thu Jul 28, 2005 7:18 pm    Post subject: Re: help me with this query
Reply with quote

hi prandip,

i want to know whether we can retrieve the records on the basis of time .
I want here time to be the unique key. I want all the records entered at a specific time.
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: Thu Jul 28, 2005 10:39 pm    Post subject:
Reply with quote

What is the starting position, length and format of the time field? What does it look like?
Back to top
View user's profile Send private message
ajay_tv2003

New User


Joined: 15 Jul 2005
Posts: 2

PostPosted: Fri Sep 02, 2005 11:35 am    Post subject: Re: help me with this query
Reply with quote

Hi,

If you want to extract only the 40 records u added( assume that the record that u added is starting at 101.)

can be acieved using sort,icetool,iceman and file-aid.

try a simply one using sort.

//sysin dd *
sort fields=copy,skiprec=100
/*
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Fri Sep 02, 2005 12:01 pm    Post subject: Re: help me with this query
Reply with quote

Hi Ajay_tv2003

We use Skiprec=n with sort to Skip first n number of records.

So In case of Skiprec=100 it just skip first 100 records.


Pavan wants to extract the recode after merging and sorting the new records.


Regards
Rupesh
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Sep 02, 2005 12:40 pm    Post subject: Re: help me with this query
Reply with quote

Hi Pavan,

When you sort your records in the morning you can put a timestamp with each record. So that its not difficult to fetch out other 40 (evening one) out of the list of 140 total records.

Use this OUTREC statement to put a timestamp with records.

Code:
OUTREC FIELDS=(DATE3,TIME1,1,L)


Here L is the length of the record. Timestamp will be in the format of YYDDDHHMMSS.

There are more formats available for timestamps in DFSORT site. For more info'n check it out.

http://www-03.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/srtmatsm.html

Regards,

Priyesh.
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts GETMAIN/FREEMAIN query Suja.Sai CICS 9 Tue Jan 31, 2017 12:01 pm


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