If it is not easy to create the file again, then you can view it by using an OS/400 command, such as Edit File (EDTF), or copy the file to a file with an ASCII CCSID using a command like this example:

CPY OBJ(ebcdic-file-name)TOOBJ(ascii-file-name)

TOCCSID(819) DTAFMT(*TXT)

Here ebcdic-file-nameis the name of the file that you cannot read on the PC and ascii-file-nameis a new name that does not yet exist. You may need to fully qualify both names (unless you used the cd command first). If the file is text in EBCDIC, you should be able to read the new file using a PC editor.

For more information about the touch and setccsid commands, see 6.2.2, “The touch and setccsid commands” on page 149.

6.1.5 The cd command

An OS/400 job has a current directory in the same way that a Windows or UNIX session has a current directory. This is a similar concept to the current library, but it is not linked. Unlike Windows and UNIX, the current directory does not affect many things. Programs are still found using the library list, which, like the current library, is independent of the current directory.

Like Windows and UNIX, you can set the current directory with the cd command. You may also use the more traditional name CHGCURDIR. Like UNIX, but not Windows, the directory separator is / rather than \. Also like UNIX, but not Windows, there is no notion of drives. Only

/is the root of all storage. Unlike UNIX or Windows, a qualified name (that is one that contains a /) needs to be in single quotation marks as shown in this example:

cd '/OrderManagement/log'

An exception is / by itself, which does not need single quotation marks.

As in UNIX and Windows, you can use the special name .. to mean the parent of the current directory.

A home directory is stored in your user profile. This is usually /home/user-name. If this directory exists, then it is set as your current directory when you sign on. If it does not exist, then your current directory is the root. You can change this home directory using the Change Profile (CHGPRF) or Change User Profile (CHGUSRPRF) command.

6.1.6 Managing stream files with the OS/400 WRKLNK command

You can use the Work with Object Links (WRKLNK) command (Figure 6-2)to explore and manage the IFS. It is a dumb terminal equivalent of Windows Explorer. For most purposes, it is easier to use Windows Explorer against a mapped drive, although WRKLNK is occasionally useful.

A time when WRKLNK is useful is when you do not have a share for the IFS directory in which you are interested. In some cases, WRKLNK can be easier or perform better. It allows you to control authority, which is not possible through Windows Explorer.

The WRKLNK command without parameters shows the contents of the current directory. Alternatively, you may follow the command with a parameter that indicates which file or directory to show. If you want to explore the entire file system and you have not set your current directory, use the following command:

wrklnk /

Chapter 6. Tips and techniques 143

Page 155
Image 155
IBM SG24-6526-00 manual Cd command, Managing stream files with the OS/400 Wrklnk command