vb6 - from access+VB 6 to COBOL -
does know way export data access db cobol code?
thanks
fixed format way go, cobol can read fixed format file.
a simple way create fixed format file in sql dialect (oracle, db2, h2 etc) use sql string functions create single field , export/write query file
ms access example query:
select left(str([tblid])+space(8),8) + left(str([tblkey])+space(20),20) + left([details]+space(30),30) + "<" exportstring tbl_ti_inttbls;
for cobol best right justify 0 fill , align decimal points of numeric fields.
also if once off can run query in access copy / paste output text editor.
ms access allows define fixed formats , use these input ( export ?) long time since used them (i using them import fixed width data). leave discussion of access expert.
you @ recordeditor (http://record-editor.sourceforge.net/record11.htm) / jrecord (http://jrecord.sourceforge.net/) because
- both let view / edit file using cobol copybooks - useful checking export match's cobol definition
- both have copybook analysis option (file menu) calculate start / length of fields in cobol copybook
- both have copy function copy csv file / cobol file using cobol copybook
note: shameless plug software
i avoid delimited file (in case delimiter occurs in field) if must, use obskure character eg ` or ~ or ^
Comments
Post a Comment