If my file is having some 1000k records with the below format, i want to retreive only few employee details with the department and employee income segment details.
When i am trying with OUTREC statement, it is throwing error?
whether i can get my expected output with OUTREC ? could pls help me?
Input file structure:
(dept details) (empid) (emp pf acc no) (technology)
DEPARTIT 1111111111111 1234567891234 MAINF --->department segment
EMPINC EPF 68.00 ---> employee income segment contains employee income details provident fund
EMPINC EBA 10779.00 ---> employee income segment contains basic salary
DEPARTIT 2222222222222 1234567891234 MAINF
EMPINC EPF 68.00
EMPINC EBA 79.00
DEPARTIT 3333333333333 1234567891234 MAINF
EMPINC EPF 68.00
EMPINC EBA 79.00
EMPINC EBO 80.00
DEPARTIT 4444444444444 1234567891234 NET
EMPINC EPF 68.00
EMPINC EBA 79.00
DEPARTIT 555555555555 1234567891234 JAVA
EMPINC EPF 68.00
EMPINC EBA 79.00
DEPARTIT 1111111111111 1234567891234 MAINF --->department segment
EMPINC EPF 68.00 ---> employee income segment contains employee income details provident fund
EMPINC EBA 10779.00 ---> employee income segment contains basic salary
DEPARTIT 2222222222222 1234567891234 MAINF
EMPINC EPF 68.00
EMPINC EBA 79.00
DEPARTIT 3333333333333 1234567891234 MAINF
EMPINC EPF 68.00
EMPINC EBA 79.00
EMPINC EBO 80.00
DEPARTIT 4444444444444 1234567891234 NET
EMPINC EPF 68.00
EMPINC EBA 79.00
DEPARTIT 555555555555 1234567891234 JAVA
EMPINC EPF 68.00
EMPINC EBA 79.00
Expected OUTPUT FILE: ( i need only few employee details)
DEPARTIT 3333333333333 1234567891234 MAINF
EMPINC EPF 68.00
EMPINC EBA 79.00
EMPINC EBO 80.00
DEPARTIT 4444444444444 1234567891234 NET
EMPINC EPF 68.00
EMPINC EBA 79.00
EMPINC EPF 68.00
EMPINC EBA 79.00
EMPINC EBO 80.00
DEPARTIT 4444444444444 1234567891234 NET
EMPINC EPF 68.00
EMPINC EBA 79.00
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(1,8,CH,EQ,C'DEPARTIT'),AND,
(9,13,EDW,C'3333333333333'),OR,
(9,13,EDW,C'4444444444444'), -
BUILD=(1,8,2X,9,13,2X,24,13,2X,57,6)),
IFTHEN=(WHEN=(1,6,CH,EQ,C'EMPINC'), -
BUILD=(1,8,2X,11,5,2X,20,5)
/*
OPTION COPY
OUTREC IFTHEN=(WHEN=(1,8,CH,EQ,C'DEPARTIT'),AND,
(9,13,EDW,C'3333333333333'),OR,
(9,13,EDW,C'4444444444444'), -
BUILD=(1,8,2X,9,13,2X,24,13,2X,57,6)),
IFTHEN=(WHEN=(1,6,CH,EQ,C'EMPINC'), -
BUILD=(1,8,2X,11,5,2X,20,5)
/*