doubt

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
manu_mf
Member
Posts: 2
Joined: Wed Aug 13, 2008 5:51 pm

doubt

Post by manu_mf » Mon Aug 18, 2008 10:07 am

I Have a file namely file1 in which some records are present (Note:Some of the duplicate records are also present i mean some records are repeating ) I want to copy the records from this file(file1) to other file namely(file2) which are repeating more than thrice means to copy the records repeating more than three times .How i acn achieve this using JCL ?

Thanks in Advance.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Aug 18, 2008 2:51 pm

use iebgener and concatenate the same ds in sysut1, 2 times. (total of 3 dd statements for sysut1 with same DSN)
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

manu_mf
Member
Posts: 2
Joined: Wed Aug 13, 2008 5:51 pm

hi

Post by manu_mf » Mon Aug 18, 2008 5:16 pm

thanks for u r reply

but i did not get u .. can u please explain me clearly wat that means and how that happens ?

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Aug 18, 2008 6:16 pm

Code: Select all

//STEP1    EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=A
//SYSUT1   DD  DSN=TTGI.ASTEX79.AMBXREF,
//             DISP=SHR
//         DD  DSN=TTGI.ASTEX79.AMBXREF,
//             DISP=SHR
//         DD  DSN=TTGI.ASTEX79.AMBXREF,
//             DISP=SHR
//SYSUT2   DD  DSN=TTGI.ASTEX79.AMBXREF.COPY,
//             DISP=(NEW,CATLG,CATLG),
//             UNIT=SYSDA,SPACE=(CYL,(10,5),RLSE),
//             DCB=(RECFM=FB,LRECL=40,BLKSIZE=0)
//SYSIN    DD  DUMMY
ask someone at your shop if you have questions on the JCL
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Mon Aug 18, 2008 8:28 pm

manu mf,

I don't think Dick understood your question. (If he did, I don't understand his answer.)

You can use a DFSORT/ICETOOL job like the following:

Code: Select all

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file
//OUT DD DSN=...  output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(p,m,f) HIGHER(3)
/*
p,m,f describes the field you want to use to check for duplicates. p is the starting position of the field, m is the length of the field and f is the format of the field. Example:

ON(1,20,CH)

If you need more specific help, provide more details such as an example of your input records and what you expect for output, p,m,f for the ON field you want to use, the RECFM and LRECL of the input file, etc.

For complete details on the SELECT operator of DFSORT's ICETOOL, see:

http://publibz.boulder.ibm.com/cgi-bin/ ... 0615185603
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others