I would like to learn EASYTRIEVE in JCL
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Job Control Language(JCL)

#1: I would like to learn EASYTRIEVE in JCL Author: ldushkin PostPosted: Wed Apr 05, 2006 10:35 am
    —
I would like to learn EASYTRIEVE in JCL. Please help me. I have one flat file with Lrecl=224, and i need to eliminate duplicate in col 47, 5 bytes

#2:  Author: kolusuLocation: San Jose PostPosted: Wed Apr 05, 2006 11:14 am
    —
Quote:

I have one flat file with Lrecl=224, and i need to eliminate duplicate in col 47, 5 bites


Basically you need to learn Easytrieve language first. JCL is just for identifying the job to operating system. JCL by it self cannot do anything.

What is the format of the contents at pos 47 for 5 bytes? Is it a character/numeric(packed/binary/zoned) ?

Also when you say eliminate dups do you want to completely remove all the duplicate entries or keep the first record of the duplicate and delete the other dups?

ex: assume you have the data as follows

Code:

ABC
ABC -DUP1
ABC -DUP2
DEF
EFG
EFG -DUP1


Now do you want the output to look like this ?

Code:

ABC
DEF
EFG


or

Code:

DEF


Kolusu

#3:  Author: ldushkin PostPosted: Thu Apr 06, 2006 8:32 am
    —
Thank you,

I have character field.

Also I need the total count records of input file.

Example:

xxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxx xxxxR11111xxxxxxxxx
xxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxx xxxxR11111xxxxxxxxx
xxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxx xxxxR22222xxxxxxxxx
xxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxx xxxxR22222xxxxxxxxx
xxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxx xxxxR33333xxxxxxxxx

TOTAL RECORDS: 216

R1111
R2222
R3333

#4:  Author: kolusuLocation: San Jose PostPosted: Thu Apr 06, 2006 9:12 am
    —
ldushkin,

Try this

Code:

//STEP0100 EXEC PGM=EZTPA00                 
//STEPLIB  DD DSN=EASYTREV.LOADLIB,
//            DISP=SHR                       
//SYSPRINT DD SYSOUT=*                       
//SYSSNAP  DD SYSOUT=*                       
//INFILE   DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//OUTFILE  DD SYSOUT=*,LRECL=80             
//SYSIN    DD *                             
FILE INFILE                                 
     IN-KEY        47 05 A                 
                                             
FILE OUTFILE FB(0 0)                         
     OUT-REC       01 80 A                 
     OUT-KEY       01 05 A                 
     OUT-REC-CNT   16 09 N                 
                                             
JOB INPUT (INFILE KEY(IN-KEY)) FINISH DISP   
                                             
  IF FIRST-DUP INFILE OR NOT DUPLICATE INFILE
     OUT-KEY      = IN-KEY                   
     PUT OUTFILE                             
  END-IF                                     
                                             
DISP. PROC                                   
                                             
      OUT-REC     = 'TOTAL RECORDS: '       
      OUT-REC-CNT = RECORD-COUNT             
      PUT OUTFILE                           
                                             
END-PROC                                     
/*                                           


Hope this helps...

Cheers

Kolusu

#5:  Author: ldushkin PostPosted: Sat Apr 08, 2006 5:21 am
    —
I appreciate all your help

#6:  Author: ldushkin PostPosted: Wed Apr 19, 2006 8:08 am
    —
Hi,

I got error


1 IN-KEY 47 05 A
1 *******B014 UNABLE TO RECOGNIZE STATEMENT

thank you

#7:  Author: kolusuLocation: San Jose PostPosted: Wed Apr 19, 2006 8:27 am
    —
ldushkin,

You are missing the FILE Statement before the IN-KEY definition. Please read carefully the posts and copy the code clearly

Hope this helps...

Cheers

Kolusu



MVSFORUMS.com -> Job Control Language(JCL)


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group