Progress 4GL
11 Haziran 2010 Cuma
Export To Excel with Progress 4GL Example
CREATE "Excel.Application" hExcel.
ASSIGN
hExcel:VISIBLE = TRUE
hWorkbook = hExcel:Workbooks:Add()
hWorkSheet = hExcel:Sheets:Item(1)
iRowNum = 8.
hExcel:Sheets:Item(1):Name = "Sayfa1".
hExcel:Columns("F:K"):Select.
hExcel:Selection:NumberFormat = "#.##0,00".
hExcel:Worksheets("Sayfa1"):Cells(iRowNum,1) = "value or variable"
.
.
.
.
.
hExcel:Columns("A:A"):SELECT.
hExcel:Selection:ColumnWidth = 13.43.
RELEASE OBJECT hWorksheet.
RELEASE OBJECT hWorkbook.
RELEASE OBJECT hExcel.
Read File with Progress 4GL Example
DEF INPUT PARAM pfName AS CHAR NO-UNDO.
DEF INPUT PARAM pTable AS CHAR NO-UNDO.
DEF VAR ttHandle AS HANDLE.
DEF VAR bHandle AS HANDLE.
DEF VAR qHandle AS HANDLE.
DEF VAR fHandle AS HANDLE.
DEF VAR bTableHandle AS HANDLE NO-UNDO.
DEF VAR pBaslik AS CHAR NO-UNDO.
DEF VAR pSatir AS CHAR NO-UNDO.
DEF VAR pColName AS CHAR NO-UNDO.
DEF VAR pDbColName AS CHAR NO-UNDO.
DEF VAR i AS INT NO-UNDO.
CREATE TEMP-TABLE ttHandle.
INPUT FROM VALUE(pfName).
IMPORT UNFORMATTED pBaslik.
DO i=1 TO NUM-ENTRIES(pBaslik,";"):
pColName = ENTRY(i, pBaslik,";").
IF pColName EQ "" THEN NEXT.
pDbColName = pTable + "." + pColName.
ttHandle:ADD-LIKE-FIELD(pColName,pDbColName).
END.
ttHandle:TEMP-TABLE-PREPARE("tFile").
bHandle = ttHandle:DEFAULT-BUFFER-HANDLE.
REPEAT:
IMPORT UNFORMATTED pSatir.
bHandle:BUFFER-CREATE.
DO i=1 TO NUM-ENTRIES(pBaslik,";"):
pColName = ENTRY(i, pBaslik,";").
IF pColName EQ "" THEN NEXT.
fHandle = bHandle:BUFFER-FIELD(pColName).
fHandle:BUFFER-VALUE = ENTRY(i, pSatir,";").
END.
END.
INPUT CLOSE.
CREATE QUERY qHandle.
qHandle:SET-BUFFERS(bHandle).
qHandle:QUERY-PREPARE("FOR EACH tFile").
qHandle:QUERY-OPEN().
CREATE BUFFER bTableHandle FOR TABLE pTable.
REPEAT TRANSACTION:
qHandle:GET-NEXT().
IF qHandle:QUERY-OFF-END THEN LEAVE.
bTableHandle:BUFFER-CREATE().
bTableHandle:BUFFER-COPY(bHandle).
bTableHandle:BUFFER-RELEASE().
END.
qHandle:QUERY-CLOSE().
bHandle:BUFFER-RELEASE().
DELETE OBJECT bTableHandle.
DELETE OBJECT ttHandle.
DELETE OBJECT qHandle.
Progress 4GL
OpenEdge Advanced Business Language, or OpenEdge ABL for short, is a business application development language created and maintained by Progress Software Corporation (PSC). The language, typically classified as a fourth-generation programming language, uses an English like syntax to simplify software development. The name was changed in 2006 to OpenEdge Advanced Business Language (OpenEdge ABL), by PSC, from PROGRESS, a.k.a. Progress 4GL, in order to overcome a presumed industry perception that 4GL's were less capable than other languages. The language was called PROGRESS or Progress 4GL prior to the release of version 10.0. A subset of the language, called SpeedScript, is used in the development of web applications.
OpenEdge ABL helps developers to develop applications optionally using its own integrated relational database and programming tool. These applications are portable across computing systems and allow access to various popular data sources without having to learn the underlying data access methods. This means that the end-user of these products can be unaware of the underlying architecture.
By combining a fourth generation language and relational database, OpenEdge ABL allows the use of the Rapid Application Development (RAD) model for developing software. A programmer and even end users can do rapid prototyping using the integrated and GUI tools of the development environment.
OpenEdge ABL helps developers to develop applications optionally using its own integrated relational database and programming tool. These applications are portable across computing systems and allow access to various popular data sources without having to learn the underlying data access methods. This means that the end-user of these products can be unaware of the underlying architecture.
By combining a fourth generation language and relational database, OpenEdge ABL allows the use of the Rapid Application Development (RAD) model for developing software. A programmer and even end users can do rapid prototyping using the integrated and GUI tools of the development environment.
Kaydol:
Yorumlar (Atom)