× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



   Best viewed with a fixed pitch font.

   To code my display files, I use Code designer, but for the examples, I
   have shown the DDS that is created.  SDA can also be used to code the
   screen files, but there might be some things like date data types that are
   not supported by SDA.

   DDS for the display file, File level keywords I use:

        A                                      DSPSIZ(24 80 *DS3)
        A                                      REF(LibName/FileName FmtName) 
   <---- Used with a field reference file
        A                                      PRINT
        A                                      INDARA
        A                                      CF03(03 'End of program')

   The INDARA keyword sets the display file to use a separate indicator area
   for the entire file.
   CF03 will turn on indicator 03 in the array of indicators if that key gets
   pressed.
   By coding the Print and CF03 function keys at file level, they are always
   available.  They can be coded on a screen by screen basis.

   DDS for a date field:

        A            DBSTARTDTER    8Y 0B 15 17REFFLD(FmtName/FieldName +
        A                                      LibName/FileName)
        A N70                                  COLOR(TRQ)
        A  70                                  COLOR(RED)
        A                                      EDTWRD('  /  /    ')
        A                                      EDTMSK('  &  &    ')
        A                                      CHECK(FE)
        A  70                                  DSPATR(PC)

   In the above code, if indicator 70 is on, the color will be red, and the
   cursor will be positioned to the field {DSPATR(PC)}.
   If Indicator 70 is off, the color will be turquoise, and the cursor will
   most likely be someplace else.

   COBOL Program:

          INPUT-OUTPUT SECTION.
          FILE-CONTROL.

         * ----------------------------------------------------------------
         *    This is the Display file
         * Note: the SI after the file name tells COBOL that
         *           this files uses a Separate Indicator area
         * ----------------------------------------------------------------
              SELECT Display-File
                     Assign to workstation-FileName-SI
                     Organization is TRANSACTION
                     Access is Dynamic
                     Relative Key is Ws-Rrn
                     File status is Display-Status.

          DATA DIVISION.
          FILE SECTION.

         * ----------------------------------------------------------------
          FD  Display-File
         * ----------------------------------------------------------------
         * Generic space reserved for the display file records
         * ----------------------------------------------------------------
          01  Display-Rec  Pic X(1024).

          Working Storage.

         * Note: Indic-Array is used to control indicators on the display
   file.
          01  ARRAYS-AND-TABLES.
             05  Indic-Array occurs 99 times Pic 1     Indicator 1.
                 88 Ind-Off                            value B"0".
                 88 Ind-On                             value B"1".

          * Note: 1 copy per format in the display file.  Gives me the
   feeling of control
          * The 'Prefix by' gives me unique field names if there are same
   names in the format
          *  the DDR gives me the alias name if available (and I usually code
   alias names) and fixes underscore to dash, etc.

          01  Display-Record.
              COPY   DDR-SflCtl1-I    IN FileName Prefix by "Ctl1-".
              COPY   DDR-SflCtl1-O    IN FileName Prefix by "Ctl1-".
              COPY   DDR-SflSubF1-I   IN FileName Prefix by "Sfl1-".
              COPY   DDR-SflSubF1-O   IN FileName Prefix by "Sfl1-".
              COPY   DDR-Win02-I      IN FileName Prefix by "Win2-".
              COPY   DDR-Win02-O      IN FileName Prefix by "Win2-".
              COPY   DDR-Scn03-I      IN FileName Prefix by "Scn3-".
              COPY   DDR-Scn03-O      IN FileName Prefix by "Scn3-".
              COPY   DDR-Win04-I      IN FileName Prefix by "Win4-".
              COPY   DDR-Win04-O      IN FileName Prefix by "Win4-".

          PROCEDURE DIVISION.

         * Check the date field.  If it needs attention (error?) set on the
   indicator 70, then display the screen

         * Error checking
              Set Ind-on(70) to true.

         * Display the screen and get input
              Write Display-rec
                    From Scn03-O
                    format "SFLCTL1"
                    indicators are indic-array

              Read  Display-File
                    Into Scn03-I
                    format "SFLCTL1"
                    indicators are indic-array

          * Check to see if F3 was pressed on the screen
              If Ind-On(03)
          *      End the program some how.

   Writing from and reading into working storage areas gives me protection
   from one screen wiping out anothers screen worth of data.

   Hope this helps!

   Jim

   At 10:01 AM 7/9/2004, you wrote:

     Thanks Jim, got any examples to share??  Would be very appreciated. 
     Thanks
     again

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.