MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Easytrieve Report Help

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
petluri
Beginner


Joined: 05 Dec 2002
Posts: 19
Topics: 5
Location: Virginia, USA

PostPosted: Mon Jan 17, 2005 9:10 am    Post subject: Easytrieve Report Help Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Mon Jan 17, 2005 12:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Jan 18, 2005 9:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Nivedha
Beginner


Joined: 18 Jan 2005
Posts: 1
Topics: 0

PostPosted: Tue Jan 18, 2005 11:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Wed Jan 19, 2005 9:31 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group