Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to find out or retrive Last rec ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to find out or retrive Last rec ?
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    Post subject: Time stamp Mismatch
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: 680
Location: NJ

PostPosted: Thu Dec 01, 2005 2:57 pm    Post subject: File
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    Post subject:
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] http://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: 1452
Location: Chicago, IL

PostPosted: Thu Dec 01, 2005 3:32 pm    Post subject: Re: How to find out or retrive Last rec ?
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    Post subject:
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 Moderator


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

PostPosted: Fri Sep 26, 2008 2:37 am    Post subject:
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:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
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 Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us