View previous topic :: View next topic |
Author |
Message |
petluri Beginner
Joined: 05 Dec 2002 Posts: 19 Topics: 5 Location: Virginia, USA
|
Posted: Mon Jan 17, 2005 9:10 am Post subject: Easytrieve Report Help |
|
|
Hi,
I have a file like this
ABCTESTNAME1123DAT1DAT2
ABCTESTNAME1123DAT3DAT4
CDETESTNAME2234DAT1DAT2
DEFTESTNAME3345DAT1DAT2
I want to have a report like this
Account bbbb Account Name bbbbb Cusnum b Data
ABC bbbbbbb TESTNAME1 bbbbbbb 123 bbbb DAT1 DAT2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb DAT3 DAT4
CDE TESTNAME2 234 DAT1 DAT2
DEF TESTNAME3 345 DAT1 DAT2
Where b - Blank
Regards,
Sreeni |
|
Back to top |
|
|
programmer1 Beginner
Joined: 18 Feb 2004 Posts: 138 Topics: 14
|
Posted: Mon Jan 17, 2005 12:16 pm Post subject: |
|
|
petluri,
This might not be the best solution but it should achieve the goal. I am sure the experts here can provide you with better solutions.
FILE RPT1 PRINTER FB (133 23408)
*
FILE OPSDATA FB(23 230)
ACCOUNT 1 3 A
ACC-NAME 4 9 A
CUS-NUM 13 3 A
DATA 16 8 A
*
*
RPT-ACCOUNT W 3 A VALUE ' '
PREV-ACCOUNT W 3 A VALUE ' '
RPT-ACC-NAME W 9 A VALUE ' '
RPT-CUS-NUM W 3 A VALUE ' '
RPT-DATA W 8 A VALUE ' '
*----------------------------------------------------------------------
* MAIN PROCESS.
*----------------------------------------------------------------------
JOB
IF EOF OPSDATA
STOP
END-IF
IF ACCOUNT _________________ Regards,
Programmer |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Tue Jan 18, 2005 9:19 am Post subject: |
|
|
petluri,
Try this job.
Code: |
//STEP0100 EXEC PGM=EZTPA00
//STEPLIB DD DSN=EASYTREV.LOADLIB,
// DISP=SHR
//EZTVFM DD UNIT=SYSDA,
// SPACE=(CYL,(25,25),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//FILEIN DD *
ABCTESTNAME1123DAT1DAT2
ABCTESTNAME1123DAT3DAT4
CDETESTNAME2234DAT1DAT2
DEFTESTNAME3345DAT1DAT2
//DETRPT DD SYSOUT=*
//SYSIN DD *
FILE FILEIN
ACCOUNT 1 3 A
ACC-NAME 4 9 A
CUS-NUM 13 3 A
DATA 16 8 A
FILE DETRPT PRINTER
JOB INPUT FILEIN
PRINT DETRPT
REPORT DETRPT PRINTER DETRPT LINESIZE 79 DTLCTL(FIRST)
CONTROL FINAL NOPRINT ACCOUNT ACC-NAME NOPRINT CUS-NUM NOPRINT
TITLE 01 ' REPORT OF ALL JOBS AND PROCS'
HEADING ACCOUNT ('ACCOUNT')
HEADING ACC-NAME ('ACC-NAME')
HEADING CUS-NUM ('CUS-NUM')
HEADING DATA ('DATA')
LINE 1 ACCOUNT ACC-NAME CUS-NUM DATA
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Nivedha Beginner
Joined: 18 Jan 2005 Posts: 1 Topics: 0
|
Posted: Tue Jan 18, 2005 11:50 pm Post subject: |
|
|
Hi kolusu,
I tried your solution with small change in the input datas
Code: | //STEP0100 EXEC PGM=EZTPA00
//STEPLIB DD DSN=EASYTREV.LOADLIB,
// DISP=SHR
//EZTVFM DD UNIT=SYSDA,
// SPACE=(CYL,(25,25),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//FILEIN DD *
ABCTESTNAME1123DAT1DAT2
ABCTESTNAME1123DAT3DAT4
ABCTESTNAME1678DAT1DAT2 --- extra datas
ABCTESTNAME1987DAT3DAT4 --- extra datas
CDETESTNAME2234DAT1DAT2
DEFTESTNAME3345DAT1DAT2
//DETRPT DD SYSOUT=*
//SYSIN DD *
FILE FILEIN
ACCOUNT 1 3 A
ACC-NAME 4 9 A
CUS-NUM 13 3 A
DATA 16 8 A
FILE DETRPT PRINTER
JOB INPUT FILEIN
PRINT DETRPT
REPORT DETRPT PRINTER DETRPT LINESIZE 79 DTLCTL(FIRST)
CONTROL FINAL NOPRINT ACCOUNT ACC-NAME NOPRINT CUS-NUM NOPRINT
TITLE 01 ' REPORT OF ALL JOBS AND PROCS'
HEADING ACCOUNT ('ACCOUNT')
HEADING ACC-NAME ('ACC-NAME')
HEADING CUS-NUM ('CUS-NUM')
HEADING DATA ('DATA')
LINE 1 ACCOUNT ACC-NAME CUS-NUM
LINE 2 DATA
/* |
The report generated is as follows
Code: | ACCOUNT ACC-NAME CUS-NUM
ABC TESTNAME1 123
DAT1DAT2
-------> Extra blank line
DAT3DAT4
ABC TESTNAME1 678 ----> ACCOUNT is not controlled
DAT5DAT9
ABC TESTNAME1 987 ----> ACCOUNT is not controlled
DAT0DAT1
CDE TESTNAME2 234
DAT1DAT2
DEF TESTNAME3 345
DAT1DAT2 |
PLease let me know if somthing else is need to be done |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Wed Jan 19, 2005 9:31 am Post subject: |
|
|
Nivedha,
You need to understand the easytrieve reporting features properly. You have CUS-NUM also as a part of your CONTROL field along with account and acc-name.
Look at the Easytrieve Plus Reference Guide and understand the reporting features clearly
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|