Jason Paradiso
2023-07-26 01:20:54 UTC
Hey, there, HPNonstoppers,
I'm in the process of conducting analysis for a project that requires to create a transaction log file to capture OLTP transactions. I read the eCOBOL manual and it suggested that an entry-sequenced file will be a good candidate for transaction logging file that stores data chronologically.
Our HPNS runs OS with J06.22+ that allows a max record length of 27576 bytes for an entry-sequenced file and I need to record size around 10k bytes on a Format 2. During our team brainstorming, someone asked if it would be better off to create variable length for this new transaction log.
I'm not quite familiar with how a cobol program would access a variable length entry-sequenced record so I did go through ecobol manual trying to find some info, but it did not completely answer all my questions. So, here I am with some of my unanswered questions:
1). From the ecobol manual, I understand that I'll need to include either a RECORD CONTAINS rec-1 TO rec-2 CHARACTERS or a RECORD IS VARYING IN SIZE FROM rec-1 TO rec-2 CHARACTERS clause, in the FD entry to declare a variable length record. Nevertheless, the file schema would still be set up with a fixed record length for the entry-sequenced file, say 12k bytes. How does declaring a variable length record for a fixed length record entry-sequenced file gonna buy us anything? Does it imply the fixed record length of 12k would potentially store more than 1 record based on the variable length (e.g., 2 5k variable length records within 12k length)?
2). What would be the best way to estimate/determine the ideal record size to prevent block split and minimize the slack space? In the ecobol manual, it mentioned that when the run-time routines execute a REWRITE or WRITE statement referencing a file of variable-length records, the number of character positions in the record written is determined. Does that mean it would always cause block split if the program declares variable length for an entry-sequence file with a fixed record length (say, 12k bytes)?
3). Last but not the least, I guess the question I kept asking myself is - given an entry-sequenced file schema that defines a fixed length of record size (e.g., 12k), how would the records of variable length written into a block?
Thanks for your attention to my questions and any feedback or suggestion will be greatly appreciated!
Jason
I'm in the process of conducting analysis for a project that requires to create a transaction log file to capture OLTP transactions. I read the eCOBOL manual and it suggested that an entry-sequenced file will be a good candidate for transaction logging file that stores data chronologically.
Our HPNS runs OS with J06.22+ that allows a max record length of 27576 bytes for an entry-sequenced file and I need to record size around 10k bytes on a Format 2. During our team brainstorming, someone asked if it would be better off to create variable length for this new transaction log.
I'm not quite familiar with how a cobol program would access a variable length entry-sequenced record so I did go through ecobol manual trying to find some info, but it did not completely answer all my questions. So, here I am with some of my unanswered questions:
1). From the ecobol manual, I understand that I'll need to include either a RECORD CONTAINS rec-1 TO rec-2 CHARACTERS or a RECORD IS VARYING IN SIZE FROM rec-1 TO rec-2 CHARACTERS clause, in the FD entry to declare a variable length record. Nevertheless, the file schema would still be set up with a fixed record length for the entry-sequenced file, say 12k bytes. How does declaring a variable length record for a fixed length record entry-sequenced file gonna buy us anything? Does it imply the fixed record length of 12k would potentially store more than 1 record based on the variable length (e.g., 2 5k variable length records within 12k length)?
2). What would be the best way to estimate/determine the ideal record size to prevent block split and minimize the slack space? In the ecobol manual, it mentioned that when the run-time routines execute a REWRITE or WRITE statement referencing a file of variable-length records, the number of character positions in the record written is determined. Does that mean it would always cause block split if the program declares variable length for an entry-sequence file with a fixed record length (say, 12k bytes)?
3). Last but not the least, I guess the question I kept asking myself is - given an entry-sequenced file schema that defines a fixed length of record size (e.g., 12k), how would the records of variable length written into a block?
Thanks for your attention to my questions and any feedback or suggestion will be greatly appreciated!
Jason