Skip to main content

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
Check out the RESET-GRID special property.
It's in section 5.10.2 Grid: Special Properties in the on-line manual.
If you use the following line of code before you start filling your grid, it will empty the grid.

MODIFY GI-SC-GRID, RESET-GRID = 1

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
Check out the RESET-GRID special property.
It's in section 5.10.2 Grid: Special Properties in the on-line manual.
If you use the following line of code before you start filling your grid, it will empty the grid.

MODIFY GI-SC-GRID, RESET-GRID = 1

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
Use the following to clear the gird control:

modify GI-SC-GRID, reset = 1.

then use the following to setup column headers if used:

perform GI-SC-GRID-CONTENT.

Clay

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
ooops.... It's RESET-GRID, not RESET.

sorry. :)

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
Thanks JGRAMER,

I found the reset-grid feature moments before getting your reply.
I'll search a little more diligently before resorting to posting!

I'm finding the documentation to be less than desired but that could be because we skipped AcuCobol-GT and jumped right into Acubench!

Thanks again for the help!

Mick

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
Thanks JGRAMER,

I found the reset-grid feature moments before getting your reply.
I'll search a little more diligently before resorting to posting!

I'm finding the documentation to be less than desired but that could be because we skipped AcuCobol-GT and jumped right into Acubench!

Thanks again for the help!

Mick

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
The GRID control has many special properties. Make certain to thoroughly read the documentation on this control before getting too involved with it. Also, look at the Acucobol-GT code samples that were installed with your development system. They contain some very useful examples.

To clear the entire grid check out the RESET-GRID property(wipes out everything, including headers, just be aware to add them back).
To delete individual rows use the RECORD-TO-DELETE property.
To replace a row of data use the RECORD-DATA property(must set Y property first).
To change data in an individual cell use the CELL-DATA property(must set X and Y properties first.)

[Migrated content. Thread originally posted on 08 October 2004]

Hello,

First, forgive my ignorance. I am new to AcuBench (and Cobol for that matter). My experience is with VB/Active Server Pages and I've recently been learning AcuBench in an effort to upgrade some character based apps to gui using the bench.

I have a grid control that is populated from an array in an FD. To do so I use the following code in an event paragraph:

*
load-grid.
MOVE ZEROS to SC-L-INDEX
PERFORM UNTIL SC-L-INDEX = 40
ADD 1 to SC-L-INDEX
MODIFY GI-SC-GRID, RECORD-TO-ADD =
sc-hist-container-item(SC-L-INDEX)
END-PERFORM
.

This loads the grid as desired with data for a particular "Member". However when I switch "members" I cannot clear the data from the grid. I've tried everything that I can think of and have checked my code several times without success. If anyone had any insight it would be appreciated.

Thanks in advance,

Mick
Thanks Dan,

You'll probably be hearing a lot from me!

Mick