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

How to find out or retrive Last rec ?


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

New User


Joined: 24 Jul 2005
Posts: 17
Location: chennai

PostPosted: Thu Dec 01, 2005 2:00 pm
Reply with quote

Hi
Can any one tell How to find out or retrive Last rec in a sequential fil? and KSDS file also
Back to top
View user's profile Send private message
rammf
Currently Banned

New User


Joined: 24 Jul 2005
Posts: 17
Location: chennai

PostPosted: Thu Dec 01, 2005 2:08 pm
Reply with quote

How to resolve Time stamp Error? Explain Briefly
answers are Appriciated.


Cheers.,
Ram
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Dec 01, 2005 2:57 pm
Reply with quote

hi frnd,

Quote:
How to find out or retrive Last rec in a sequential fil? and KSDS file also


In sequential file just read the record one by one until the EOF is reached.

Quote:
How to resolve Time stamp Error?


if u give me the exact detail then let me try
Back to top
View user's profile Send private message
Hames

New User


Joined: 03 Oct 2005
Posts: 49

PostPosted: Thu Dec 01, 2005 3:03 pm
Reply with quote

Hi Ram,

Quote:
How to resolve Time stamp Error? Explain Briefly




Check:-

Did you bind the correct DBRM member?

Have you bound in the correct DB2 sub-system?

Are you running with the correct load library?

You should check each step of the compile/bind job, and then check the job that runs the offending program.


Also go thru this previous post:

[url] www.ibmmainframes.com/about621.html [/url]
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Thu Dec 01, 2005 3:32 pm
Reply with quote

Quote:
How to find out or retrive Last rec in a sequential fil?

I remember this topic been discussed earlier too.

Well, I'll suggest adding a SEQ number to each rec & SORT the file DESCENDING & then read First record.

Regards,

Priyesh.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Dec 02, 2005 8:55 am
Reply with quote

If you have FileAid you can use to do what you want. It works for KSDS too.
Code:

//COPYKEY EXEC PGM=FILEAID
//DD01     DD  DSN=YOUR.FILE
//DD01O    DD  DSN=file.that.contains.last.rec
//SYSIN    DD  *
$$DD01 COPYBACK OUT=1
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: Fri Sep 26, 2008 2:37 am
Reply with quote

Quote:
Can any one tell How to find out or retrive Last rec in a sequential fil? and KSDS file also


You can now do this kind of thing quite easily using the new SUBSET operator of DFSORT's ICETOOL available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:
 
//S1  EXEC  PGM=ICETOOL                                           
//TOOLMSG   DD  SYSOUT=*                                           
//DFSMSG    DD  SYSOUT=*                                           
//IN DD DSN=...  input file                                       
//OUT DD DSN=...  output file         
//TOOLIN DD *                                                     
SUBSET FROM(IN) TO(OUT) KEEP INPUT LAST
/*     


For complete details on the new SUBSET function and the other new functions available with PTF UK90013, see:

Use [URL] BBCode for External Links
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 To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Find the occurrence of Key Field (Par... DFSORT/ICETOOL 6
No new posts Find a record count/numeric is multip... COBOL Programming 1
No new posts Need to find a specific STRING COBOL Programming 11
Search our Forums:

Back to Top