understand about text modes (msdostext_mode)

Text Modes and Changes to the VOB
All new VOBs created in 2002.05.00 and later will be MSDOS enabled by default.

Note: For versions before 2002.05.00, running msdostext_mode on a VOB makes a change to the VOB database, which lets the VOB database store both the UNIX and MSDOS file lengths (sizes) for any given version of an element.

Running msdostext_mode does not create additional source containers, but will result in additional cleartext generation for the alternate text mode.

Text Modes and Individual Elements
To check if a particular element version has been converted for msdostext_mode, use the "cleartool dump " command. Under heading "stored fstat", there is an entry for "mode". If mode is set to "00", then the version has NOT been converted with the msdostext_mode utility. If mode has a value other than "00", the version has been converted.

Example (not converted):
stored fstat:
ino: 0; type: 1; mode: 00; uid: 4294967294; gid: 4294967294

^^

Example (converted):
stored fstat:
ino: 0; type: 1; mode: 021; uid: 4294967294; gid: 4294967294

^^^

Text Mode and Views
To determine the mode of a view, use the "cleartool lsview -properties -full ".

Transparent text mode is displayed as unix, strip_cr text mode is displayed as strip_cr, and insert_cr text mode is displayed as msdos.

Examples:
%>cleartool lsview -prop -full strip_cr
strip_cr \\kis2\ccstg_e\views\KIS2\jdoe\strip_cr.vws
^^^
Text mode: strip_cr
^^^

%>cleartool lsview -prop -full insert_cr
insert_cr \\kis2\ccstg_e\views\KIS2\jdoe\insert_cr.vws
^^^
Text mode: msdos
^^^

%>cleartool lsview -prop -full transparent
non-share-do \\kis2\ccstg_e\views\KIS2\jdoe\transparent.vws
^^^
Text mode: unix
^^^

Alternatively, you can view the contents of the ".view" file in the view storage directory. For transparent mode views, there will be nothing indicated about text modes. For insert_cr mode views, there will be a line that reads "-textmode msdos". For strip_cr mode views, there will be a line that reads "-textmode strip_cr".



Text Mode and Cleartext
Cleartext created for an insert_cr mode (msdostext_mode) view will have an ".msdos" extension at the end of the cleartext file name.

In a dynamic view you can use the "mvfsstorage " or use the "cleartool dump " to view the cleartext container.

Tips on Troubleshooting
If you have problems with file truncation or file contents when using text mode views there are some basic troubleshooting techniques you can use.

Note the following example of using UNIX and DOS mode views to access an element.

1. Make sure the text mode for the view is the intended one (using the steps above).

2. Verify that the VOB has been msdostext_mode enabled and that the file version in question has been converted.

3. Make sure the view text mode matches the type of editor being used.

4. Check the type of machine the file is being accessed from (Windows or UNIX).

For example, if the answers to the above were:

1. -textmode msdos
2. Yes and yes
3. Notepad
4. Windows

Then the file should look correct. In other words, the correct mode of the view being used.

If the answers are:

1. -textmode msdos
2. Yes and yes
3. Emacs
4. UNIX

Then the file will NOT look correct since Emacs is a UNIX-based editor. So, in this case, the correct version of the cleartext is not being presented to the editor due to the mode of the view being used.

If the answers are:

1. Nothing relating to tmode
2. No and no.
3. Emacs
4. UNIX

Then the file should look correct. In other words, the correct version of the cleartext is being presented to the editor based on the mode of the view being used.

No comments:

Post a Comment