English

How To: Append INFO files

Summary

This document provides four methods to append INFO files.

Files to be appended must have the same item definitions. You can use the ITEMS <info_file> command, at the Arc prompt, to compare the item definitions of the files to be appended. If the item definitions do not match, use ADDITEM, CALCULATE, DROPITEM, or ALTER to modify the tables.

Procedure

The INFO files used in the following 4 methods are:

Code:
Arc: LIST FILEA
Record FIELD1 FIELD2
1 11111 101
2 22222 202

Arc: LIST FILEB
Record FIELD1 FIELD2
1 33333 303
2 44444 404
3 55555 505

Arc: ITEMS FILEA
COLUMN ITEM NAME WIDTH OUTPUT TYPE N.DEC
1 FIELD1 5 5 I -
6 FIELD2 3 3 I -

Arc: ITEMS FILEB
COLUMN ITEM NAME WIDTH OUTPUT TYPE N.DEC
1 FIELD1 5 5 I -
6 FIELD2 3 3 I -


How to create the sample INFO files:

Arc: INFO

ENTER USER NAME>ARC

ENTER COMMAND >DEFINE FILEA
ITEM NAME,WIDTH [,OUTPUT WIDTH] ,TYPE [,DECIMAL PLACES] [,PROT.LEVEL]
1
ITEM NAME>FIELD1,5,5,I
6
ITEM NAME>FIELD2,3,3,I
9
ITEM NAME>

ENTER COMMAND >ADD
1
FIELD1>11111
FIELD2>101
2
FIELD1>22222
FIELD2>202
3
FIELD1>
2 RECORD(S) ADDED

ENTER COMMAND >DEFINE FILEB
ITEM NAME,WIDTH [,OUTPUT WIDTH] ,TYPE [,DECIMAL PLACES] [,PROT.LEVEL]
1
ITEM NAME>FIELD1,5,5,I
6
ITEM NAME>FIELD2,3,3,I
9
ITEM NAME>

ENTER COMMAND >ADD
1
FIELD1>33333
FIELD2>303
2
FIELD1>44444
FIELD2>404
3
FIELD1>55555
FIELD2>505
4
FIELD1>
3 RECORD(S) ADDED

ENTER COMMAND >Q STOP

· Method 1: Use the ARCEDIT PUT command to append FILEB records into FILEA.

Arcedit: edit fileb info
The INFO file is now D:\DATA\FILEB with 3 element(s)

Arcedit: select all
3 element(s) now selected

Arcedit: put filea
INFO FILE FILEA
already exists. Do you want to append <Y/N> : Y
Copying the INFO record(s) into FILEA...
3 INFO record(s) copied

Arcedit: save
Saving changes for D:D:\DATA\FILEA
Saving INFO file...

Arc: LIST FILEA
Record FIELD1 FIELD2
1 11111 101
2 22222 202
3 33333 303
4 44444 404
5 55555 505

· Method 2: Use the ARCEDIT GET command to append FILEB records into FILEA.

Arcedit: edit filea info
The INFO file is now D:\DATA\FILEA with 2 element(s)

Arcedit: get fileb
Copying the records from FILEB into D:\DATA\FILEA...
3 INFO record(s) copied

Arcedit: save

Arcedit: list filea
Record FIELD1 FIELD2
1 11111 101
2 22222 202
3 33333 303
4 44444 404
5 55555 505

· Method 3: Use the INFO SAVE and GET commands to append FILEB records into FILEA. This method can be used in an AML running INFO commands.

Arc: INFO

ENTER USER NAME>ARC

ENTER COMMAND >SELECT FILEB
3 RECORD(S) SELECTED

ENTER COMMAND >SAVE FILEBTEMP INIT
FILE CREATED

ENTER COMMAND >SELECT FILEA
2 RECORD(S) SELECTED
ENTER COMMAND >GET FILEBTEMP COPY
5 RECORD(S) SELECTED

ENTER COMMAND >QUIT STOP

Arc: LIST FILEA
Record FIELD1 FIELD2
1 11111 101
2 22222 202
3 33333 303
4 44444 404
5 55555 505

· Method 4: Use the INFO GET command to append FILEB records into FILEA when the INFO internal name for FILEB is known. This method can be used in an INFO program to update a master relate file.

Arc: INFO

ENTER COMMAND >DIR
TYPE NAME INTERNAL NAME NO. RECS LENGTH EXTERNL
DF FILEA ARC0000DAT 10 20 XX
DF FILEB ARC0001DAT 146 36 XX

ENTER COMMAND >SELECT FILEA

ENTER COMMAND >GET ARC0001.DAT COPY

ENTER COMMAND >QUIT STOP

Arc: LIST FILEA
Record FIELD1 FIELD2
1 11111 101
2 22222 202
3 33333 303
4 44444 404
5 55555 505