Menu

#26 Changing Field-Attributes for Screens like CICS-Maps

unclassified
open
cl
None
5 - default
2022-07-09
2014-04-09
No

Is there a possibility to change the Field-Characteristics for Fields in a screen-Section fo a TUI? I habe some applications which can be used stand-alone or called from other programs. Some Input-Fields schould be not updatable, if the program is called from another one but updatable, if it is used stand-alone. I help me at this time by using two screen-definitions and the value of nummer-of-call-parameters to decide, which should be used - but if the screen changes i must change both definitions
and i hate redundant code. In CICS one could change this attributs in the map by filling the corresponding attribute-bytes in the map-definition. It would be a "nice o have" if it would be possible in open-cobol too.

Greetings from Germany
Klaus

Related

Wish List: #26

Discussion

  • Luke Smith

    Luke Smith - 2014-08-24

    I haven't done anything with CICS in over 25 years. I've forgotten what it looks like.

    Please post some code samples here of what it should look like.

     
  • Klaus Schäfer

    Klaus Schäfer - 2014-09-17

    For CICS-Maps you define some more fields for the real Field upon the screen.
    You have a structure wich is generated by the BMS-Macros for CICS-Maps.
    it looks like

    01   map.
         05 fieldlength pic s9(004) comp.
         05 fieldtype   pic x.     *> here you can change the field-attributes (protect, skip and so on...).
         05 readlfield  pic x(30). *> This is the real Data-Field.
    

    If you use the extended data-stream you have some more fields, to change Color, highlight and so on.
    I think, it would be enough, when we have the possibility to change a
    field from an input-field to a protected field and reverse and it would be
    fine, if changing the color and highlighting would be possible.
    I have some Applications, where the Enduserdata should be kept in the Screen-Map until he/she changes to a new case or so. Then protecting the fields protects the enduser from entering wrong data and when the protected fields have autoskip the enduser has much less to type on his keyboard.
    For example the enduser enters an account-number and get a list of some data for this account. Now he can select some functions and after returning to the
    main screen the account-field should be protected that the cursor is direct on the field, where he can select a new function and so on...
    I think something like set screen fieldname protected with color... would be a nice to have.
    In the screen section you have then

    01 map.
        05       fieldname using mydatafield  *> that in working-storage
                position, color and so on...
    

    in Procedure Division you have

    showpic.
                display map.
               *> ... here the enduser fills in his data...
                accept map.
                *> ... work with the data
                set screen fieldname protected color green.
                go to showpic.
    
     

    Last edit: Simon Sobisch 2021-08-03
  • Simon Sobisch

    Simon Sobisch - 2022-07-08
    • assigned_to: cl
    • Priority: 1 --> 5 - default
     
  • Simon Sobisch

    Simon Sobisch - 2022-07-08

    I think that's something Christian is working on.

     
  • Eugenio Di Lorenzo

    A request that has appeared many times.
    see FR 103 (see screenshot) and FR 367.
    Together with the request for a way to read the screen content
    (which characters are at row / column) together with the attributes (e.g. which colors).

     
    • Vincent (Bryan) Coen

      On 08/07/2022 19:37, Eugenio Di Lorenzo wrote:

      A request that has appeared many times.
      see FR 103 (see screenshot) and FR 367.
      Together with the request for a way to read the screen content
      (which characters are at row / column) together with the attributes
      (e.g. which colors).

      This was a feature when running under Dos and CPM where you could
      capture, display a screen
      full of text etc as you had access to the screen buffer.

      You cannot do this in Linux without using specific (may be) libraries.

      The point I am trying to make is that what, how, where etc will vary
      depending on the O/S if at all.

      Needless to say they are not in any way similar to CICS, DMS, CMS maps etc.

       
      • Eugenio Di Lorenzo

        Totally agree with you.
        But the ncurses and pdcurses libraries already have the functions to read characters and attributes that are on the screen (es. mvinch() ).
        What is needed is to make them available with GnuCOBOL for example through verbs like DISPLAY OMITTED AT 0203 WITH ... etc etc to set attributes without changing characters. Or something like ACCEPT FROM SCREEN AT 0203 ... etc etc ... to read the characters on the screen, similarly to what is available in AcuCOBOL.
        Alternatively, GC_CBL_READ_SCRCHAR or GC_CBL_READ_SCRATTR routines could be written and made available similarly to what was available with Realia COBOL.

         
        👍
        1
        • cl

          cl - 2022-07-09

          Hi Klaus,

          maybe I could implement a "read-only" attribute in XAD, that could be
          changes at runtime.

          Could you pleade send a sample CICS source?

          Regards,
          Christian

          Am 09.07.22 um 09:02 schrieb Eugenio Di Lorenzo:

          Totally agree with you.
          But the ncurses and pdcurses libraries already have the functions to
          read characters and attributes that are on the screen (es. mvinch() ).
          What is needed is to make them available with GnuCOBOL for example
          through verbs like |DISPLAY OMITTED AT 0203 WITH ...| etc etc to set
          attributes without changing characters. Or something like |ACCEPT FROM
          SCREEN AT 0203 ...| etc etc ... to read the characters on the screen,
          similarly to what is available in AcuCOBOL.
          Alternatively, GC_CBL_READ_SCRCHAR or GC_CBL_READ_SCRATTR routines
          could be written and made available similarly to what was available
          with Realia COBOL.


          [feature-requests:#26]
          https://sourceforge.net/p/gnucobol/feature-requests/26/ Changing
          Field-Attributes for Screens like CICS-Maps

          Status: open
          Group: unclassified
          Created: Wed Apr 09, 2014 05:04 PM UTC by Klaus Schäfer
          Last Updated: Fri Jul 08, 2022 06:37 PM UTC
          Owner: cl

          Is there a possibility to change the Field-Characteristics for Fields
          in a screen-Section fo a TUI? I habe some applications which can be
          used stand-alone or called from other programs. Some Input-Fields
          schould be not updatable, if the program is called from another one
          but updatable, if it is used stand-alone. I help me at this time by
          using two screen-definitions and the value of
          nummer-of-call-parameters to decide, which should be used - but if the
          screen changes i must change both definitions
          and i hate redundant code. In CICS one could change this attributs in
          the map by filling the corresponding attribute-bytes in the
          map-definition. It would be a "nice o have" if it would be possible in
          open-cobol too.

          Greetings from Germany
          Klaus


          Sent from sourceforge.net because you indicated interest in
          https://sourceforge.net/p/gnucobol/feature-requests/26/

          To unsubscribe from further messages, please visit
          https://sourceforge.net/auth/subscriptions/

           

          Related

          Wish List: #26


Log in to post a comment.

MongoDB Logo MongoDB