
IBM i 7.3 Files and file systems Files and file systems Database file management IBM Note Before using this information and the product it supports, read the information in “Notices” on page 211. This document may contain references to Licensed Internal Code. Licensed Internal Code is Machine Code and is licensed to you under the terms of the IBM License Agreement for Machine Code. © Copyright International Business Machines Corporation 1998, 2015. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Database file management.................................................................................... 1 What's new for IBM i 7.3..............................................................................................................................1 PDF file for Database file management.......................................................................................................1 Overview of database file management......................................................................................................2 File types.................................................................................................................................................2 Working with database files.........................................................................................................................3 File resources allocation........................................................................................................................ 3 File resource allocation: Overview................................................................................................... 3 File resources that must be allocated.............................................................................................. 4 How the system allocates resources................................................................................................4 Copying files............................................................................................................................................5 Copying files: Overview.....................................................................................................................5 Copying files: Commands............................................................................................................5 Copying files: Supported functions............................................................................................. 7 Copying files: Basic functions................................................................................................... 11 Copying physical or logical files......................................................................................................16 Creating the to-file (CRTFILE parameter)...................................................................................... 17 Specifying CRTFILE(*YES) on either the Copy File or Copy From Query File command.........18 Authorities, user profiles, and file capabilities of the to-file....................................................18 Adding, replacing, and updating records (MBROPT parameter)................................................... 19 Specifying *REPLACE when copying files................................................................................. 19 Specifying *ADD when copying files......................................................................................... 19 Specifying *UPDADD when copying files..................................................................................22 Copying records into files that use trigger programs............................................................... 23 Selecting the records to copy......................................................................................................... 23 Selecting records using a specified record format name (RCDFMT parameter)..................... 24 Selecting records by relative record numbers (FROMRCD and TORCD parameters)..............24 Selecting records by record keys (FROMKEY and TOKEY parameters)................................... 25 Selecting a specified number of records (NBRRCDS parameter)............................................ 28 Selecting records based on character content (INCCHAR parameter)................................... 29 Selecting records based on field value (INCREL parameter)...................................................30 Copying deleted records (COMPRESS parameter)................................................................... 32 Printing records (PRINT, OUTFMT, and TOFILE(*PRINT) parameters)......................................... 34 Creating an unformatted print listing........................................................................................35 Selecting members to copy............................................................................................................ 35 Copying file members: Overview.............................................................................................. 35 Allowed copy operations and parameters................................................................................35 Copying all members within a file.............................................................................................36 Copying only certain members within a file..............................................................................36 Specifying the member name for the copy operation..............................................................36 Special considerations for the Override Database File and Override Tape File commands... 37 How the copy function adds members to the to-file................................................................37 Copying between different database record formats (FMTOPT parameter)................................ 38 Specifying data for different field types and attributes........................................................... 40 Converting universal coded character set (UCS-2) graphic fields........................................... 47 Converting universal coded character set transformation format (UTF-8 character and UTF-16 graphic)................................................................................................................... 48 Converting System/370 floating-point and null fields............................................................. 49 Conversion rules for copying files.............................................................................................50 Adding or changing source file sequence number and date fields (SRCOPT and SRCSEQ parameters)............................................................................................................................... 51 iii Copying device source files to database source files...............................................................51 Copying database source files to device source files...............................................................52 Copying database source files to database source files.......................................................... 52 Copying complex objects................................................................................................................52 Copying files that contain user-defined functions................................................................... 52 Copying files that contain user-defined types..........................................................................52 Copying files that contain datalinks..........................................................................................53 Copying files that contain large objects....................................................................................53 Copying files that contain identity columns or ROWID attributes........................................... 59 Copying between different systems...............................................................................................59 Using the Copy From Import File command to copy between different systems...................59 Using the Copy To Import File command to copy between different systems........................66 Opened files..........................................................................................................................................69 Scope of opened files..................................................................................................................... 69 Opening files using temporary file descriptions............................................................................ 70 Detection of file description changes.............................................................................................73 Displaying information about open files........................................................................................ 74 Monitoring file status with the open and I/O feedback area......................................................... 74 Shared files...........................................................................................................................................76 Open considerations for files shared in a job.................................................................................77 I/O considerations for files shared in a job.................................................................................... 78 Close considerations for files shared in a job...............................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages222 Page
-
File Size-