Z-nomegrid-RIORDINA-RECORD

Navigation:  Documentazione SCREENS > Files generati > 'NOMEPRG'.PRC > Gestione griglie modo "A" >

Z-nomegrid-RIORDINA-RECORD

Previous pageReturn to chapter overviewNext page

In questa routine viene ricostruita la chiave di ordinamento per un singolo record del file di transito.

 

Esempio della chiamata alla routine

 

Questa routine viene richiamata all'interno della routine padre di riordinamento del file di transito:

Z-nomegrid-RIORDINA-TRANSITO

Z-nomegrid-RIORDINA

 

Esempio della routine

 

     *------------------------------------------------------------------*

     * Sezione in cui si definisce l'ordinamento di un record

     *------------------------------------------------------------------*

      z-grid-det-riordina-record.

          move 'S'     to gor-r-ok

          move ' '     to t-gor-r-ord

          move 1       to gor-r-off

 

          move 0               to gor-r-k

          perform gor-r-pnt times

             add 1             to gor-r-k

 

             if gor-r-off = gor-r-l-ord

                exit perform

             end-if

 

             evaluate gor-r-col (gor-r-k)

              when gcn-r-riga

                compute grk-r-riga-ordinamento =

                  (t-gor-r-riga * 10**k-grk-r-riga-n-dec) +

                  10**(k-grk-r-riga-n-int + k-grk-r-riga-n-dec)

                move function length(grk-r-riga-ordinamento)

                  to gor-r-fld

                perform Z-nomegrid-TEST-LUNGHEZZA

 

                if gor-r-ord-tipo (gor-r-k) = 'D'

                   move grk-r-riga-ordinamento

                     to w-grid-det-str-inversa

                   perform Z-nomegrid-INVERTI-DATO

                   move w-grid-det-str-inversa

                     to t-gor-r-ord (gor-r-off:gor-r-fld)

                 else

                   move grk-r-riga-ordinamento

                     to t-gor-r-ord (gor-r-off:gor-r-fld)

                end-if

              when gcn-r-dato-1

                move function length(t-gor-r-dato-1)

                  to gor-r-fld

                perform Z-nomegrid-TEST-LUNGHEZZA

 

                if gor-r-ord-tipo (gor-r-k) = 'D'

                   move t-gor-r-dato-1

                     to w-grid-det-str-inversa

                   perform Z-nomegrid-INVERTI-DATO

                   move w-grid-det-str-inversa

                     to t-gor-r-ord (gor-r-off:gor-r-fld)

                 else

                   move t-gor-r-dato-1

                     to t-gor-r-ord (gor-r-off:gor-r-fld)

                end-if

           .........

           .........

             end-evaluate

             add gor-r-fld to gor-r-off

          end-perform

          .

 

 

 

 

 

 

 

 

Enter topic text here.