Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to create an Ouput file when there is Data and No Data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Dhaneshkumar

New User


Joined: 17 May 2010
Posts: 4
Location: Banglore

PostPosted: Wed Aug 03, 2011 2:33 pm    Post subject: Need to create an Ouput file when there is Data and No Data
Reply with quote

Hi all,

My requirement is to create an output file with the table name and the Date details , if the tables are going to expire within 60 days. I have created this. If there is no table is going to be expire within 060 days then i should create an Empty message in that output file.

For Example this is the output file i have created which are going to be expired within 60 days.

Code:
1REPORT-01                    EXPIRY TABLES                             
 BNK:   A1                                                             
-                                                                       
                              START       END                           
 CORP       TABLE/KEY          DATE       DATE                         
0 A1    AAA8 A1        027   03/16/12   12/31/12                       
        AAAA A1        028   03/16/12   12/31/12                       
                                                                       
  A1    BBBB A1AAACPN10010   03/10/14   03/10/14                       
        BBBB A1BLKBLCK0002   03/10/14   03/10/14                       
                                                                       
  A1    CCCC A3FRD620        09/06/11   12/31/12                       
        CCCC A1FRD635        01/03/12   12/31/13                       
                                                                       
        DDDD A1FRD655        03/19/12   12/31/13                       
        DDDD A1JTE082        06/27/11   12/31/12                       
                                                                       
        EEEE A1FRD655        03/19/12   12/31/13                       
        EEEE A1JTE082        06/27/11   12/31/12                       
                                                                       
                                                                       
                                                                       
          SUMMAY                 TABLES TOTAL                           
          -----------            ------------                           
          AAAA COUNT            : 002                                   
          BBBB COUNT            : 002                                   
          CCCC COUNT            : 002                                   
          DDDD COUNT            : 002                                   
          EEEE COUNT            : 002                                   
                                                                       
          TOTAL FOR CORP        010                                     
                                                                       
1REPORT-01                    EXPIRY TABLES                             
 BNK:   A2                                                             
-                                                                   
                              START       END                       
 CORP       TABLE/KEY          DATE       DATE                       
0 A1    AAA8 A2        027   03/16/12   12/31/12                     
                                                                     
  A1    BBBB A2AAACPN10010   03/10/14   03/10/14                     
                                                                     
        DDDD A2FRD655        03/19/12   12/31/13                     
        DDDD A2JTE082        06/27/11   12/31/12                     
                                                                     
                                                                     
          SUMMAY                 TABLES TOTAL                       
          -----------            ------------                       
          AAAA COUNT            : 001                               
          BBBB COUNT            : 001                               
          CCCC COUNT            : 000                               
          DDDD COUNT            : 002                               
          EEEE COUNT            : 000                               
                                                                     
          TOTAL FOR CORP        004   


Herewith i have attached the code as well.
Now the probelm is i need to create the Output file with an message saying "No Activity for Today" if there is no Data reported.
Code:

 REPORT-01                    EXPIRY TABLES                             
 BNK:  A1                                                               
-                                                                       
 NO ACTIVITY FOR TODAY     


I am not able to create this.

Please help me to resolve this issue.

attachment inlined
Code:
FILE FILE1  VS
DATE-VS-KEY                1    15  A
DATE-RUN-DATE             16    04  P  0

FILE FILE2 VS
FILE2-REC                    1   500  A
FILE2-CORP                   6     2  A
TABLE-IDENT                  1     4  A
**********************************************************************
* MACRO DEFINITION FOR AAAA, BBBB, CCCC, DDDD AND EEEE TABLE
**********************************************************************
*
AAAA-RECORD                   1  80 A
%AAAA

BBBB-RECORD                   1  80 A
%BBBB

CCCC-RECORD                   1  138 A
%CCCC

DDDD-RECORD                   1  300 A
%DDDD

EEEE-RECORD                   1  200 A
%EEEE
*
FILE EXPRPT    PRINTER  FB (133 0)

                                                                        00616001
* WDATE WORK AREA
 %WCDAT
*
************************
*WORKING-STORAGE - END
************************

 WS-PAGE-COUNT       S    3  P  VALUE 1
 WS-AAAA-COUNT       S    3  N  VALUE 0
 WS-BBBB-COUNT       S    3  N  VALUE 0
 WS-CCCC-COUNT       S    3  N  VALUE 0
 WS-DDDD-COUNT       S    3  N  VALUE 0
 WS-EEEE-COUNT       S    3  N  VALUE 0
 WS-BC-TOTALS        W    3  N
*
 WS-AAAA-COUNT       S    3  N  VALUE 0
 WS-BBBB-COUNT       S    3  N  VALUE 0
 WS-CCCC-COUNT       S    3  N  VALUE 0
 WS-DDDD-COUNT       S    3  N  VALUE 0
 WS-EEEE-COUNT       S    3  N  VALUE 0
.
.


*---------------BEGIN LOGIC--------------------------

JOB INPUT NULL

 WS-DATE-KEY    = ' '
 WS-DATE-CORP   = '000'

 %KEYREAD FILE2 WS-DATE-KEY

 WS-RUN-DATE    = DATE-RUN-DATE
 WS-TIME-HHMMSS = SYSTIME

 WC-HEDR-MM     = WS-RUN-DATE-MM
 WC-HEDR-DD     = WS-RUN-DATE-DD
 WC-HEDR-YY     = WS-RUN-DATE-YY

 STOP

JOB INPUT FILE2 START POINT-PROC

CASE TABLE-IDENT
   WHEN 'AAAA'
      PERFORM AAAA-TABLE-PROC
   WHEN 'BBBB'
      PERFORM BBBB-TABLE-PROC
   WHEN 'CCCC'
      PERFORM CCCC-TABLE-PROC
   WHEN 'DDDD'
      PERFORM DDDD-TABLE-PROC
   WHEN 'EEEE'
      PERFORM EEEE-TABLE-PROC
   OTHERWISE
      IF TABLE-IDENT > 'EEEE'
         STOP
      END-IF
END-CASE


POINT-PROC. PROC

POINT FILE2 GE WS-TABLE-POINT STATUS

 IF (FILE-STATUS NE 0 OR EOF FILE2)
    DISPLAY 'BAD POINT...FILE STATUS = ' FILE-STATUS
    RETURN-CODE = 16
    STOP
 END-IF

END-PROC

AAAA-TABLE-PROC. PROC

   AAAA-RECORD         = BCC-REC
   WS-TABLE-IDENT      = TABLE-IDENT
   WS-OUT-CORP         = AAAA-CORP-NO
   WS-OUT-TABLE-ID     = AAAA-REC-KEY

   WS-WORK-DT-YYMMDD   = AAAA-EFF-DT-FROM
   WS-OUT-START-DT-MM  = WS-WORK-DT-YYMMDD-MM
   WS-OUT-START-DT-DD  = WS-WORK-DT-YYMMDD-DD
   WS-OUT-START-DT-YY  = WS-WORK-DT-YYMMDD-YY

   WS-WORK-DT-YYMMDD   = AAAA-EFF-DT-TO
   WS-OUT-END-DT-MM    = WS-WORK-DT-YYMMDD-MM
   WS-OUT-END-DT-DD    = WS-WORK-DT-YYMMDD-DD
   WS-OUT-END-DT-YY    = WS-WORK-DT-YYMMDD-YY

   WP-END-DT-MM        = WS-OUT-END-DT-MM
   WP-END-DT-DD        = WS-OUT-END-DT-DD
   WP-END-DT-YY        = WS-OUT-END-DT-YY
   WC-END-DT           = WP-END-DT
   W-AAAA-COUNT        = W-AAAA-COUNT + 1

   PERFORM CALL-DATE-CALC-PARA

END-PROC.


BBBB-TABLE-PROC. PROC

 BBBB-RECORD         = BCC-REC
 IF BBBB-REC-NO = '1'
   WS-TABLE-IDENT      = TABLE-IDENT
   WS-OUT-CORP         = BBBB-CORP-NO
   WS-OUT-TABLE-ID     = BBBB-REC-KEY

   WS-WORK-DT-MMDDYY   = BBBB-EFFECTIVE-DATE
   WS-OUT-START-DT-MM  = WS-WORK-DT-MMDDYY-MM
   WS-OUT-START-DT-DD  = WS-WORK-DT-MMDDYY-DD
   WS-OUT-START-DT-YY  = WS-WORK-DT-MMDDYY-YY


   WS-WORK-DT-MMDDYY   = BBBB-TERMINATION-DATE
   WS-OUT-END-DT-MM    = WS-WORK-DT-MMDDYY-MM
   WS-OUT-END-DT-DD    = WS-WORK-DT-MMDDYY-DD
   WS-OUT-END-DT-YY    = WS-WORK-DT-MMDDYY-YY

   WP-END-DT-MM        = WS-OUT-END-DT-MM
   WP-END-DT-DD        = WS-OUT-END-DT-DD
   WP-END-DT-YY        = WS-OUT-END-DT-YY
   WC-END-DT           = WP-END-DT

   PERFORM CALL-DATE-CALC-PARA

 END-IF

END-PROC.

** CCCC TABLE

CCCC-TABLE-PROC. PROC

   CCCC-RECORD         = BCC-REC
   WS-TABLE-IDENT      = TABLE-IDENT
   WS-OUT-CORP         = CCCC-CORP-NO
   WS-OUT-TABLE-ID     = CCCC-REC-KEY

   WS-WORK-DT-CCYYMMDD = CCCC-EFF-DT
   WS-OUT-START-DT-MM  = WS-WORK-DT-CCYYMMDD-MM
   WS-OUT-START-DT-DD  = WS-WORK-DT-CCYYMMDD-DD
   WS-OUT-START-DT-YY  = WS-WORK-DT-CCYYMMDD-YY

   WS-WORK-DT-CCYYMMDD = CCCC-EXP-DT
   WS-OUT-END-DT-MM    = WS-WORK-DT-CCYYMMDD-MM
   WS-OUT-END-DT-DD    = WS-WORK-DT-CCYYMMDD-DD
   WS-OUT-END-DT-YY    = WS-WORK-DT-CCYYMMDD-YY

   WP-END-DT-MM        = WS-OUT-END-DT-MM
   WP-END-DT-DD        = WS-OUT-END-DT-DD
   WP-END-DT-YY        = WS-OUT-END-DT-YY
   WC-END-DT           = WP-END-DT

   PERFORM CALL-DATE-CALC-PARA

END-PROC.

** DDDD TABLE

DDDD-TABLE-PROC. PROC

   DDDD-RECORD         = BCC-REC
   WS-TABLE-IDENT      = TABLE-IDENT
   WS-OUT-CORP         = DDDD-CORP-NO
   WS-OUT-TABLE-ID     = DDDD-REC-KEY

   WS-WORK-DT-MMDDYY   = DDDD-EFFECTIVE-DATE
   WS-OUT-START-DT-MM  = WS-WORK-DT-MMDDYY-MM
   WS-OUT-START-DT-DD  = WS-WORK-DT-MMDDYY-DD
   WS-OUT-START-DT-YY  = WS-WORK-DT-MMDDYY-YY

   WS-WORK-DT-MMDDYY   = DDDD-EXPIRE-DATE-MMDDYY
   WS-OUT-END-DT-MM    = WS-WORK-DT-MMDDYY-MM
   WS-OUT-END-DT-DD    = WS-WORK-DT-MMDDYY-DD
   WS-OUT-END-DT-YY    = WS-WORK-DT-MMDDYY-YY

   WP-END-DT-MM        = WS-OUT-END-DT-MM
   WP-END-DT-DD        = WS-OUT-END-DT-DD
   WP-END-DT-YY        = WS-OUT-END-DT-YY
   WC-END-DT           = WP-END-DT

   PERFORM CALL-DATE-CALC-PARA

END-PROC.

** EEEE TABLE - LOYALTY POINTS

EEEE-TABLE-PROC. PROC
   EEEE-RECORD        = BCC-REC
   WS-TABLE-IDENT     = TABLE-IDENT
   WS-OUT-CORP        = EEEE-CORP-NO
   WS-TABLE-IDENT     = TABLE-IDENT
   WS-OUT-TABLE-ID    = EEEE-REC-KEY

   WS-WORK-DT-0CCYYMMDD    = EEEE-PROMO-EFF-DATE
   WS-OUT-START-DT-MM      = WS-WORK-DT-0CCYYMMDD-MM
   WS-OUT-START-DT-DD      = WS-WORK-DT-0CCYYMMDD-DD
   WS-OUT-START-DT-YY      = WS-WORK-DT-0CCYYMMDD-YY

   IF EEEE-PROMO-EXP-DATE     GT  0

   WS-WORK-DT-0CCYYMMDD    = EEEE-PROMO-EXP-DATE
   WS-OUT-END-DT-MM        = WS-WORK-DT-0CCYYMMDD-MM
   WS-OUT-END-DT-DD        = WS-WORK-DT-0CCYYMMDD-DD
   WS-OUT-END-DT-YY        = WS-WORK-DT-0CCYYMMDD-YY

   WP-END-DT-MM            = WS-OUT-END-DT-MM
   WP-END-DT-DD            = WS-OUT-END-DT-DD
   WP-END-DT-YY            = WS-OUT-END-DT-YY
   WC-END-DT               = WP-END-DT
   PERFORM CALL-DATE-CALC-PARA

   END-IF

   WS-WORK-DT-0CCYYMMDD    = EEEE-LOYALTY-EFF-DATE
   WS-OUT-START-DT-MM      = WS-WORK-DT-0CCYYMMDD-MM
   WS-OUT-START-DT-DD      = WS-WORK-DT-0CCYYMMDD-DD
   WS-OUT-START-DT-YY      = WS-WORK-DT-0CCYYMMDD-YY

   IF EEEE-LOYALTY-EXP-DATE   GT  0

   WS-WORK-DT-0CCYYMMDD    = EEEE-LOYALTY-EXP-DATE
   WS-OUT-END-DT-MM        = WS-WORK-DT-0CCYYMMDD-MM
   WS-OUT-END-DT-DD        = WS-WORK-DT-0CCYYMMDD-DD
   WS-OUT-END-DT-YY        = WS-WORK-DT-0CCYYMMDD-YY

   WP-END-DT-MM            = WS-OUT-END-DT-MM
   WP-END-DT-DD            = WS-OUT-END-DT-DD
   WP-END-DT-YY            = WS-OUT-END-DT-YY
   WC-END-DT               = WP-END-DT

   PERFORM CALL-DATE-CALC-PARA

   END-IF

END-PROC

CALL-DATE-CALC-PARA. PROC.
*
   W-FUNCTION-CODE      = C-FUNC-CALCULATE
   W-FORMAT-1           = C-FMT-MMDDYY
   W-DATE-1-6           = WC-END-DT
   W-FORMAT-2           = C-FMT-MMDDYY
   W-DATE-2-6           = WS-RUN-DATE

   PERFORM CALL-WAASDATE

   IF  W-NUMBER-FIELD <= +060                                           LOG05427
       PRINT RPT1
   END-IF

   DISPLAY 'W-NUMBER-FIELD: '    W-NUMBER-FIELD

END-PROC

 CALL-WAASDATE. PROC

 CALL WAASDATE USING (W-DATE-AREA W-DOUBLE)

 IF (W-RETURN-CODE = 0)
 ELSE
     DISPLAY '*******************************************************'
     DISPLAY '* BAD RETURN CODE FROM WAASDATE  RC = ' W-RETURN-CODE
     DISPLAY '* W-DATE-AREA = ' W-DATE-AREA
     DISPLAY '*******************************************************'
     CALL WAASABND
     STOP
 END-IF

END-PROC
*
*********************************************************************
*
REPORT RPT1 LINESIZE(132)        +
       NOSPREAD NOADJUST NODATE NOPAGE +
       PRINTER(EXPRPT) DTLCTL FIRST
SEQUENCE WS-OUT-CORP WS-TABLE-IDENT
CONTROL  FINAL       NOPRINT +
         WS-OUT-CORP NOPRINT RENUM +
         WS-TABLE-IDENT NOPRINT
TITLE 1  COL 1   'BCEXPR-01'                        +
         COL 30  'SPECTRUM TABLE EXPIRATION DATES'  +
         COL 90  'RUN:'  SYSDATE WS-TIME-HHMMSS
TITLE 2  COL 1   'CORP:' WS-OUT-CORP                +
         COL 90  'AS OF: ' WC-HEDR-MMDDYY  'PAGE' -1 WS-PAGE-COUNT
HEADING  WS-OUT-CORP       ('CORP')                                     02740020
HEADING  WS-OUT-TABLE-ID   ('TABLE/KEY')                                02750020
HEADING  WS-OUT-START-DT   ('START' 'DATE')                             02770020
HEADING  WS-OUT-END-DT     ('END' 'DATE')                               02780020
LINE 01  WS-OUT-CORP     +                                              02860020
         WS-OUT-TABLE-ID +
         WS-OUT-START-DT +
         WS-OUT-END-DT
*
*-------------------
 AFTER-LINE. PROC
*-------------------

 CASE WS-TABLE-IDENT
   WHEN 'AAAA'
       WS-AAAA-COUNT = WS-AAAA-COUNT + 1
   WHEN 'BBBB'
       WS-BBBB-COUNT = WS-BBBB-COUNT + 1
   WHEN 'CCCC'
       WS-CCCC-COUNT = WS-CCCC-COUNT + 1
   WHEN 'DDDD'
       WS-DDDD-COUNT = WS-DDDD-COUNT + 1
   WHEN 'EEEE'
       WS-EEEE-COUNT = WS-EEEE-COUNT + 1
 END-CASE
END-PROC
*-------------------
 AFTER-BREAK. PROC
*-------------------
 IF LEVEL EQ 1
    DISPLAY ' '
 END-IF

*
 IF  LEVEL EQ 2
*
 WS-BC-TOTALS   = WS-AAAA-COUNT + WS-BBBB-COUNT + WS-CCCC-COUNT  +
                + WS-DDDD-COUNT + WS-EEEE-COUNT
*
 DISPLAY ' '
 DISPLAY COL 10 ' '
 DISPLAY COL 10 'CORP SUMMAY           '     ' TABLES TOTAL   '
 DISPLAY COL 10 '-----------           '     ' ------------   '
 DISPLAY COL 10 'AAAA COUNT            : '      WS-AAAA-COUNT
 DISPLAY COL 10 'BBBB COUNT            : '      WS-BBBB-COUNT
 DISPLAY COL 10 'CCCC COUNT            : '      WS-CCCC-COUNT
 DISPLAY COL 10 'DDDD COUNT            : '      WS-DDDD-COUNT
 DISPLAY COL 10 'EEEE COUNT            : '      WS-EEEE-COUNT
 DISPLAY ' '
 DISPLAY COL 10 'TOTAL FOR CORP        '        WS-BC-TOTALS
 DISPLAY COL 10 ' '
 *

   WS-AAAA-COUNT   = 0
   WS-BBBB-COUNT   = 0
   WS-CCCC-COUNT   = 0
   WS-DDDD-COUNT   = 0
   WS-EEEE-COUNT   = 0
   WS-BC-TOTALS    = 0
 *
 END-IF

END-PROC

*********************************************************************
ENDPAGE. PROC
   WS-PAGE-COUNT = WS-PAGE-COUNT + 1
END-PROC                                                                08080002
                                                                        08791101

Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Aug 04, 2011 9:40 pm    Post subject:
Reply with quote

Well.. I am not able to understand what code is above.. (Can anybody please help)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Aug 04, 2011 11:28 pm    Post subject: Reply to: Need to create an Ouput file when there is Data an
Reply with quote

'Tis Easytrieve plus. Very short of time now, so I'll try to get to it later....
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Aug 04, 2011 11:38 pm    Post subject: Reply to: Need to create an Ouput file when there is Data an
Reply with quote

You have a start proc on your job, no finish proc.

If you put a finish proc, you can find out if you have written any report statements. Then, if you haven't written anything, easiest thing is a second report with your "empty" format.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Aug 05, 2011 3:54 pm    Post subject:
Reply with quote

Thanks Bill...

I was thinking there could have been possible DFSORT solution.. if OP is able to give input file format .. (and if he wants dfort solution...)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Fri Aug 05, 2011 4:15 pm    Post subject:
Reply with quote

Nice thought Escapa, but it is reading a VSAM KSDS and jumping part-way up the file with a key (the POINT, like a Cobol START). Then date selection using date from a seperate VSAM file. Even if convenient to do with DFSORT, it is very simple to add the extra `no data here` to the existing code.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Sat Aug 06, 2011 5:28 am    Post subject: Re: Need to create an Ouput file when there is Data and No D
Reply with quote

Dhanesh, since you don't seem to be around waiting for an answer, I dug a little deeper.

The report example you show is not produced by the code you show.

When you encounter an error, like the START not working, or an invalid date, you should STOP EXECUTE instead of STOP. I know you abend when there is an invalid date, but if you copy the code somewhere else and set a return-code, like the other example, you would need to remenber the EXECUTE. Either don't STOP after the abend, or STOP EXECUTE.

You seem to prefix your S-type fields the same as your W-type fields, which requires constant checking as to what type something is. Use different prefixes.

You are amending a W-type field in a report procedure. Not good practice.

Your AAAA-RECORD is in your input area, yet you move data to it. To me, not good practice unless you are going to update a record. Same with the others.

You identify two error conditions on the POINT, but only display data about one of them.

Your indentation doesn't help readability.

You have much duplicated code which could go into procs.

You issue your print statement from a proc called CALL-DATE-CALC-PARA, so that was a surprise.

You are doing your own page numbering, yet at one point you RENUM. I know why you are doing your own pages, but there are neater ways these days to deal with that problem.

You mix = and EQ etc on your IFs. Syntactically valid, but why?

There will be more, but I decided to stop looking. You also have not shown the full code.
Back to top
View user's profile Send private message
Dhaneshkumar

New User


Joined: 17 May 2010
Posts: 4
Location: Banglore

PostPosted: Mon Aug 08, 2011 2:03 pm    Post subject: Reply to: Need to create an Ouput file when there is Data an
Reply with quote

Hi Bill,

As you suggested i will try with FINISH-PROC to get the desired output

and let you all know. Thank you for your Review comments as well.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Mon Aug 08, 2011 2:10 pm    Post subject: Reply to: Need to create an Ouput file when there is Data an
Reply with quote

No problem.

It is good to see someone using macros for file layouts. Do you parameterise them?

Mmmm.... FINISH-PROC

That would be

Code:
JOB [...] +
FINISH FINISH-PROC
and

Code:
FINISH-PROC. PROC

I'd choose another name :-)

I'm joking, I know you know what you mean.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Aug 08, 2011 2:16 pm    Post subject:
Reply with quote

Quote:

It is good to see someone using macros for file layouts.


Yes, and it would be nice to show the macro expansion, so one can see
if there is something rotten inside (to quote Shakespeare).
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Mon Aug 08, 2011 2:21 pm    Post subject: Reply to: Need to create an Ouput file when there is Data an
Reply with quote

You mean Simon Shakespeare? The guy famous for his analysis of Easytrieve macros?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Aug 08, 2011 2:24 pm    Post subject: Re: Reply to: Need to create an Ouput file when there is Dat
Reply with quote

Bill Woodger wrote:
You mean Simon Shakespeare? The guy famous for his analysis of Easytrieve macros?


Hello Bill,

that's nice you knowing one of my aliases.
Back to top
View user's profile Send private message
Dhaneshkumar

New User


Joined: 17 May 2010
Posts: 4
Location: Banglore

PostPosted: Wed Aug 10, 2011 11:52 am    Post subject: Reply to: Need to create an Ouput file when there is Data an
Reply with quote

Hi Bill,

AS you suggested i tried with Finish-proc as below and it is working fine.

Code:
 FINISH-PROC. PROC                                                 
     IF WS-FLAG = 'Y' AND NO-REC = 'Y'                             
        PRINT RPT2                                                 
     END-IF                                                       
 END-PROC.                                                         
 *                                                                 

REPORT RPT2 LINESIZE(132)        +                                     
       NOSPREAD NOADJUST NODATE NOPAGE SPACE 3 +                       
       PRINTER(EXPRPT)                                                 
SEQUENCE WT-OUT-CORP    +                                             
         WT-TABLE-IDENT                                               
CONTROL  WT-OUT-CORP NOPRINT RENUM                                     
TITLE 1  COL 1   BANK-01'                        +                 
         COL 30  EXPIRATION REPORT'  +                 
         COL 90  'RUN:'  SYSDATE WS-TIME-HHMMSS                       
TITLE 2  COL 1   'CORP:' WT-OUT-CORP                +                 
         COL 90  'AS OF: ' WC-HEDR-MMDDYY  'PAGE' -1 WS-PAGE-COUNT     
HEADING  WT-OUT-CORP       ('CORP')                                   
HEADING  WT-OUT-TABLE-ID   ('TABLE/KEY')                               
HEADING  WT-OUT-START-DT   ('START' 'DATE')                           
HEADING  WT-OUT-END-DT     ('END' 'DATE')                             
LINE 01  WT-OUT-CORP      +                                           
         WT-OUT-TABLE-ID  +                                           
         WT-OUT-START-DT  +                                           
         WT-OUT-END-DT                                                 
LINE 02  W-NO-ACTIVITY     


Thank you all for the reply.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Wed Aug 10, 2011 12:38 pm    Post subject: Reply to: Need to create an Ouput file when there is Data an
Reply with quote

Thanks for letting us know.

I see that you stuck with the "stutter" name for your finish proc :-)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Unwrap the data based on delimiter X'25' bhavana yalavarthi DFSORT/ICETOOL 30 Fri Dec 09, 2016 10:25 am
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us