MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Wed Nov 01, 2006 5:16 pm Post subject: removing the duplicate record and picking up the last entery
There is a log file (ESDS) which will contain information records. When ever the information is updated online (CICS) one log entry created. I need to select the latest entry from the log file to prepare the extract file (sequential file). The information record does not contain any field that signifies the latest entry. So I need to pick up the last entry that has been entered. How I can do this using jcl? I don't have provision to write program. _________________ Babu
Joined: 18 Feb 2006 Posts: 812 Location: San Jose, CA
Posted: Fri Nov 10, 2006 3:18 am Post subject:
If you want to write the last record in the VSAM input file to an output file, you can use a DFSORT job like this:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB or VSAM)
//SORTOUT DD DSN=... output file (VB or VSAM)
//SYSIN DD *
* Reformat record to:
* Sort descending on seqnum to get last record
* as first record.
* Keep the last record and reformat record back to:
If you want to do something else, you need to explain more clearly what you want to do. An example of the input records and expected output records would help. _________________ Frank Yaeger - DFSORT Development Team (IBM) - email@example.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum