The 128 bytes you are talking about could be anything depending on what platform your are on, which compiler you are using and exactly how your variable length file was defined (ie: sequential, line sequential, indexed etc.)
I do not believe anyone can answer your questions without knowing more detail about your file. Additionally, Vendors of PC compilers are not known for giving out what all the extra control characters in various file types really stand for. I think they expect you to use their utilities and programs to read these files.
As a general rule, variable length line sequential files do not have any of these control bytes included in the file. Just the standard x'0D0A' to indicate the end of line.
In the IBM mainframe, what goes in front of a variable length records is a block length in binary followed by a binary record length in front of each record.
etom
As you can see, it is not an easy answer without many more details.
Can't answer this without information about your compiler/platform.
Here's one description of how this is handled on one platform:
"IBM mainframes ... A record descriptor word or RDW precedes each variable length record. The RDW is a four-byte field. The first two bytes are an unsigned integer representing the length of the record including the RDW. The allowable range for an RDW is 4 to 32,767. The last two bytes are, by convention, binary zeros or EBCDIC spaces. In complex data sets the last two bytes are used to span records over two or more physical records. To conserve disk or tape space, applications block logical records into physical records. A Block Descriptor Word or BDW precedes each block. It has exactly the same format as the RDW."
The format of the header record is in the System Reference manual. If you don't have access to this manual, I probably could find mine and transcribe the info.
Just so you understand, if you are trying to "help out a mainframe programmer" - the header information in a MAINFRAME variable length sequential file is VERY different from the header information in a NetExpress variable length sequential file.
Why does your "mainframe programmer" WANT to know this information for a NetExpress environment? If they are trying to "emulate" the mainframe environment on a PC, then they should be looking (IMHO) at "Mainframe Express" and NOT "Net Express". If he is trying to PORT a mainframe application to the PC, then other issues apply.
The problem appears to have been resolved although I'm not sure how.
The original problem was ...
We have two systems, one of which can take the output from the other in a variable length sequential file.
The second system was being implemented at a client site, and they were attempting to import their historical data (dont know the format but it wasnt compatible)
A consultant managed to convert their data files using SAS but this didnt include the RDW or the 128 byte header. When I looked at a correctly formated data file in a hex editor and saw the header, I asked what it was and no-one knew what it contained, so I posted the question.
WebRabbit
Thanks for your offer. I will check our copy of the manual and if it isn't available, I will ask the powers that be why it isn't available
Again thanks all for your help
Go not to cats for advice for they will just walk over the keyboard
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.