Problem:
How to convert a sequential file to an indexed file using a cmd file.
When deploying a Net Express project to a client machine that doesn't have Net Express installed and it is necessary to convert a sequential file into an indexed file before the file can be used in a COBOL program how can this be done using a cmd file?
Resolution:
Run rebuild from a command prompt. ....\\RebuildProject\\rebuild<Enter>
Rebuild will display it's usage on the screen grouped into four categories: Rebuilding; Validation; Recovery; and Converting. Refer to Related tab above for a text copy of the following information.
Rebuild command line options, Net Express 4.0, All04n40.exe, 1/26/2004
1) Usage for rebuilding:
rebuild in-file[,out-file] [ /option ...]
/i[:command] - rebuild and display information
/v[:n] - display running count every n records
/e - continue after duplicate key error
/q - quick rebuild
/p - rebuild format 8 file in place (no backup)
/n[:command] - no output - just display file information
/x:n - key of reference [out-file only]
/d - rebuild corrupt data file
/y - force rebuild when file size discrepancy reported
/z - specifies server for all files
2) Usage for validation:
rebuild in-file /f:[cn][dn] /v[:n] /m[:n]
c - n level of checking to perform
2 - Check free space [FSL] structure
8 - Check index file structure
256 - Check data file structure (only) with file open for sharing
Invalid options will be ignored.
d - n level of messages to be displayed [0-5]
0 - No display
1 - Display errors
2 - Display selected options
3 - Display file header information
4 - Display record types in dat
5 - Display index statistics
/m:n - Max number of temp files to be used
3) Usage for recovery:
rebuild in-file /u
This option will attempt to recover a file for which the last update
operation was incomplete
4) Usage for converting:
rebuild in-file[,out-file] [ /option ...]
/c:[dn][in] - compression - data and/or index
d - n = 0-255 (0 for no compression) [out-file only]
i - n = 0-7 (0 for no compression)
/k:{{keystart keylen[,]}*
[s{sparse char}][c{key comp value}][:]}*
/o:so[,to] - so=source org, to=target org LSEQ, SEQ, REL, IND.
/s:source format - format of indexed input
MS1, MS2, MS2X, CISAM, LII, BTRV, MF, MF4, MF8, MF9
/t:target format - format of index oput CISAM, LII, BTRV, MF, MF4, MF8, MF9
/l:load type - load/unload for specific formats R9, 9R
/r:[Vmin-max] - Record length, fixed and record length or, variable and
minimum and maximum record lengths
Open the Net Express 4.0 Help, click Contents (tab) and open these three books:
....Programming
........File Handling
............Repairing Indexed Files
to see a series of articles about rebuild options including some examples.
Attachments:
#ServerExpress
#AcuCobol
#COBOL
#RMCOBOL
#netexpress
