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

help me with this query


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 84
Location: In my tiny cubicle ...

PostPosted: Thu Jul 28, 2005 6:14 pm
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
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 Developer


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

PostPosted: Thu Jul 28, 2005 10:39 pm
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
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: 463

PostPosted: Fri Sep 02, 2005 12:01 pm
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: 1448
Location: Chicago, IL

PostPosted: Fri Sep 02, 2005 12:40 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top