Code Comments
Programming Forum and web based access to our favorite programming groups.I've scoured every internet resource I know, but can't figure out if it is possible to do pull this off. Here's the scenario: I have a file that consists of 14 segments that are each 16,A long. I have a separate file that I access that contains the user-configured size for each segments. For instance, the first segment could be up to 16 long, but the user has said that it should only be 2 long. In other programs that I have, I read the first file and then segment by segment, pull in what the user has said the size should be. Using this data, I can substring the fields and then string them all together for a nice clean presentation. All is well. Now I want to put them on a screen where a user can input into these fields. I don't want to display the full 16,A field, though. I want to limit the size of the screen field based on the user-configuration pulled from this separate file. I've seen lots of posts regarding varying-length records, but my file is always the same size. Its these 14 fields that will be different sizes at each different run-time. Any help or pointing to other resources would be appreciated--or am I way off-base on this ever working?
Post Follow-up to this messageOn 6 Jul 2006 13:51:56 -0700, "Hitch" <bdrinkall@verizon.net> wrote: >I've scoured every internet resource I know, but can't figure out if it >is possible to do pull this off. Here's the scenario: > >I have a file that consists of 14 segments that are each 16,A long. >I have a separate file that I access that contains the user-configured >size for each segments. For instance, the first segment could be up to >16 long, but the user has said that it should only be 2 long. In other >programs that I have, I read the first file and then segment by >segment, pull in what the user has said the size should be. Using this >data, I can substring the fields and then string them all together for >a nice clean presentation. All is well. > >Now I want to put them on a screen where a user can input into these >fields. I don't want to display the full 16,A field, though. I want >to limit the size of the screen field based on the user-configuration >pulled from this separate file. I've seen lots of posts regarding >varying-length records, but my file is always the same size. Its these >14 fields that will be different sizes at each different run-time. Any >help or pointing to other resources would be appreciated--or am I way >off-base on this ever working? I do this with delimited fields for spread sheets. One way I compact them it to have a subroutine that compacts each field right before writing the file (using reference modification). This works because of the delimiters. If you don't want the delimiters, then put them in the intermediate record and have the subroutine take them off while copying to the output record. Posted Via mcse.ms Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- http://www.mcse.ms
Post Follow-up to this messageHitch wrote: > Now I want to put them on a screen where a user can input into these > fields. I don't want to display the full 16,A field, though. I want > to limit the size of the screen field based on the user-configuration > pulled from this separate file. 01 Field-16 PIC X(16). 01 Field-15 REDEFINES Field-16. 03 Field-15X PIC X(15). 03 FILLER PIC X(1). 01 Field-14 REDEFINES Field-16. 03 Field-14X PIC X(14). 03 FILLER PIC X(2). .. EVALUATE Field-Size WHEN 16 DISPLAY Field-16 AT xxyy ACCEPT Field-16 AT xxyy ... Or you could use, say, Flexus SP/2 where you can define a set of fields at design time and then rejig at runtime to the required sizes.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.