Consultor Eletrônico



Kbase P125476: 4GL/ABL: How to programmatically dump the values of the connected database 4GL sequences?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/14/2008
Status: Verified

GOAL:

4GL/ABL: How to programmatically dump the values of the connected database 4GL sequences?

GOAL:

How to dump the values of the sequences of a 4GL database using 4GL?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

The following code will dump the values of all the 4GL sequences of the first connected database ( LDBNAME(1) ):

OUTPUT TO TemporaryProcedure.p.
FOR EACH _Sequence WHERE NOT _Sequence._Seq-name BEGINS "$":
PUT UNFORMATTED
'EXPORT '
_Sequence._Seq-Num
' '
QUOTER(_Sequence._Seq-Name)
' CURRENT-VALUE('
_Sequence._Seq-Name
','
LDBNAME(1)
').'
SKIP.
END.
OUTPUT CLOSE.
OUTPUT TO SequenceDataDump.d.
RUN TemporaryProcedure.p.
OUTPUT CLOSE.