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

  1. both let view / edit file using cobol copybooks - useful checking export match's cobol definition
  2. both have copybook analysis option (file menu) calculate start / length of fields in cobol copybook
  3. 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

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -