MANUAL FOR AN INTERNATIONAL TRADE DATA BASE ON THE IBM COMPUTER OF THE HUNGARIAN ACADEMY OF SCIENCES
F e r e n c Lakb AndrAs Nagy
F e b r u a r y 1983 CP-83-20
CoZZaborative P a ~ e r s r e p o r t work which h a s n o t been p e r f o r m e d s o l e l y a t t h e I n t e r n a t i o n a l I n s t i t u t e f o r A p p l i e d S y s t e m s A n a l y s i s and which h a s r e c e i v e d o n l y l i m i t e d r e v i e w . V i e w s o r o p i n i o n s e x p r e s s e d h e r e i n do n o t n e c e s s a r i l y r e p r e s e n t t h o s e o f t h e I n s t i t u t e , i t s N a t i o n a l Xember O r g a n i z a t i o n s , o r o t h e r o r g a n i - z a t i o n s s u p p o r t i n g t h e work.
INTERNATIONAL INSTITUTE FOR APPLIED SYSTEMS ANALYSIS
A-2361 L a x e n b u r g , A u s t r i a
PREFACE
T h i s manual h a s been p r e p a r e d t o a l l o w IIASA e c o n o m i s t s t o a c c e s s a n i n t e r n a t i o n a l t r a d e d a t a b a s e s t o r e d on t h e IBM computer a t t h e Hungarian Academy o f S c i e n c e s i n Budapest.
I t d e s c r i b e s t h e c o n t e n t s o f t h e d a t a b a s e and t3e c a p a b i l i t i e s o f t h e d a t a - h a n d l i n g program, and e x p l a i n s how t h e d a t a b a s e may be a c c e s s e d from IIASA v i a t h e Gateway system. I t i s hoped
t h a t t h e i n f o r m a t i o n made a v a i l a b l e i n t h i s way w i l l b e u s e f u l i n t h e work on economic s t r u c t u r a l change c u r r e n t l y i n p r o g r e s s a t I I A S A .
A n a t o l i Smyshlyaev A c t i n g L e a d e r ,
P a t t e r n s of Economic S t r u c t u r a l Change and I n d u s t r i a l Adjustment
I N T R O D U C T I O N
A two-year r e s e a r c h p r o j e c t d e a l i n g w i t h t h e s t r u c t u r a l a n a l y s i s o f i n t e r n a t i o n a l t r a d e and t h e r e l a t e d development a l t e r n a t i v e s w a s c o m p l e t e d i n Hungary i n 1981 ( s e e Nagy, 1 9 8 2 ) . I t was b a s e d on t r a d e d a t a p r o v i d e d on t a p e by t h e UNCTAD
S t a t i s t i c a l U n i t ; t h e s e d a t a r e p r e s e n t a s l i g h t l y amended and u p d a t e d v e r s i o n o f t h e s t a t i s t i c s p u b l i s h e d i n t h e UNCTAD Hand- book ( 1 9 7 9 ) .
The t r a d e d a t a were r e g r o u p e d a c c o r d i n g t o t h e e l e v e n i m p o r t / e x p o r t r e g i o n s and s i x cohmodity c l a s s e s c o n s i d e r e d i n t h e model. Data f o r s e l e c t e d y e a r s w e r e c h o s e n from t h e t i m e series 1955-1977 and s i x s c e n a r i o s f o r 1990 w e r e g e n e r a t e d a s d e s c r i b e d i n Nagy ( 1 982)
.
The d a t a were p r o c e s s e d and t h e c o m p u t a t i o n s performed a t t h e Computing C e n t e r o f t h e Hungarian P l a n n i n g Commission. To make t h e d a t a a v a i l a b l e t o t h e P a t t e r n s o f Economic S t r u c t u r a l Change and I n d u s t r i a l Adjustment P r o j e c t a t IIASA, t h e d a t a b a s e was t r a n s f e r r e d t o t h e I B M computer o f t h e Hungarian Academy o f S c i e n c e s , w h i c h may be a c c e s s e d v i a t h e IIASA G a t e - way.
This Manual describes the contents of the data base and the capabilities of the data-handling program, and explains how the data base may be accessed from IIASA.
An
updated trade statistics tape is expected from UNCTAD in the near future; this should include information for 1980.
We intend to transfer this new data base to IIASA with an adapted handling program in the early part of 1983. When this is complete a new Manual will be issued to replace this one.
I.
DATA
The data base contains trade flow values xijk in current (t)
prices in US dollars, where i indicates the exporting region,
jthe importing region, k the commodity group and t the year.
The data are stored in three-dimensional matrices for each
year, as shown in Figure 1, where
T o t a l imports by groups o f c o z m o d i t i e s x. j,k3
1 m p o r t i n g 4 Countries
Trade f l o w s by commodity groups cxi j k ~
T o t a l exports by groups of comnodit i e s C X ~ , ~ I
Figure 1. The three-dimensional matrix of trade flows.
I a . R e g i o n a l D i s a g g r e g a t i o n
Eleven i m p o r t / e x p o r t r e g i o n s a r e i n c l u d e d i n t h e d a t a b a s e ; t h e s e a r e l i s t e d t o g e t h e r w i t h t h e i r r e f e r e n c e c o d e s i n t h e f o l l o w i n g t a b l e .
No. Regions Code
1 S o v i e t Union SU
2 E a s t e r n Europe EE
3 C e n t r a l l y p l a n n e d A s i a SA
4 Western Europe W
5 North America NA
6 J a p a n J P
7 Other d e v e l o p e d c o u n t r i e s OD
8 L a t i n America LA
9 A f r i c a AF
1 0 Western A s i a WA
11 E a s t A s i a and Oceania AS
12 T o t a l s o c i a l i s t c o u n t r i e s (1-3) TS 13 T o t a l d e v e l o p e d c o u n t r i e s (4-7) TD 1 4 T o t a l d e v e l o p i n g c o u n t r i e s (8-11) TG
15 T o t a l world t r a d e (1-1 1 ) TW
I b . Commodity D i s a g g r e g a t i o n
S i x commodity g r o u p s a r e i n c l u d e d i n t h e d a t a b a s e ; t h e s e a r e l i s t e d t o g e t h e r w i t h t h e i r r e f e r e n c e c o d e s i n t h e f o l l o w i n g t a b l e .
No. Commodity g r o u p s SITC* Code
1 Food and a g r i c u l t u r a l m a t e r i a l s 0+1+4+2-27-23 AGRPROD
2 M i n e r a l s and m e t a l s 27+28+67+68 MINMET
3 F u e l s 3 FUELS
4 Chemicals 5 CHEM
5 O t h e r m a n u f a c t u r e d goods 6+8-67-68 OTMAN
6 Machinery 7+9 MACH
7 P r i m a r y p r o d u c t s 0+1+2+3+4+67+68 PRIM
8 M a n u f a c t u r e s 5+6-67-68+7+8+9 MANUF
9 T o t a l w o r l d t r a d e O+.
.
.+9 TW* S t a n d a r d I n t e r n a t i o n a l Trade C l a s s i f i c a t i o n .
Ic. Years
The data base contains statistics for the following years:
-
1955-1970: every fifth year-
1971-1977: every year-
1990: six different forecasts denoted A,B,Z,PU,PP,PM (see Nagy, 1982).11. THE DATA-BASE HANDLING PROGRAM IIa. The Types of Matrices Generated
The data-base handling program is capable of generating not only the simple three-dimensional trade flow matrix illustrated in Figure 1, but also various other matrices based on these data.
The types of matrices available, together with their reference codes, are listed in the following table.
No. Matrix Code Contents 1 Trade flows
Export shares Import shares Commodity shares Total trade shares Trade intensity indicators
Rate of growth Trade balances Exp/imp shares
X x (t) ijk
-
x (t)x (t) ijk
.
.k'ijk(t) = x (t)x. jk(t) i.k
IIb. The Matrix Cross-Sections Displayed
The information from these three-dimensional matrices is displayed in the form of two-dimensional cross-sections through the matrices. These cross-sections are described, and their reference codes given, in the following table.
No. Code Rows Columns
1 I/J Exporting regions Importing regions 2 I/K Exporting regions Commodities.
3 J/K Importing regions Commodities
IIc. Computing Methods
Several negative values are found within the data base.
These arise from errors in the UNCTAD data, and are most commonly found for the region EE and the commodity group MANUF.
The original data are used everywhere except in matrices D and R. In these cases it was necessary to replace the negative values by zeros in order to make computation possible. In matrix D, the diagonal elements of the trade flow data have also been modified so that 6ijk = 1 for regions SU, SA, and JP.
111. USE OF THE DATA-BASE HANDLING PROGRAM
This section explains how a user logged on to the IIASA VAX can access the trade-flow data base stored on the IBM at the
Hungarian Academy of Sciences in Budapest. The commands that the IIASA user has to enter are indicated by underlining; the re- sponses of the machine appear without underlines. Each command should be followed by a carriage return, and u represents a space.
S t e p 1. C o n n e c t t o t h e I B M c o m p u t e r rloginugateway
PROFS
SELECT, 4255
CONNECTED TO IBM
S t e p 2. L o g o n t o t h e I B M c o m p u t e r
Obtain the account number and password for your virtual machine from Albert Labadi in Computer Services. When the IBM is expecting a command it prompts with R;
S t e p 3. C r e a t e a t e m p o r a r y d i s c a n d c o p y f i l e s tdef
mind
TAPE 18K481 ATTACHED AS 181 FOR
....
mind2
S t e p 4 . E d i t t h e p a r a m e t e r f i l e o f t h e p r o g r a m e u m i n d u a d a t
U s e o f t h e IBM e d i t o r
-
see S e c t i o n V I P a r a m e t e r s o f t h e program-
see S e c t i o n I V S t e p 5 . E x e c u t e t h e p r o g r a m a n d t y p e t h e r e s u l t smind 1
typeumind l u r e s u l t
S t e p 6 . I f t h e r e a r e m o r e r e q u e s t s , r e t u r n t o S t e p 4
S t e p 7 . D i s c o n n e c t f r o m I B M c o m p u t e r a n d I I A S A g a t e w a y locrof f
[CONTROL] P
-
CLR [ESCI QI V . PARAMETERS OF THE PROGPM
Each l i n e o f t h e p a r a m e t e r f i l e i s a r e q u e s t f o r a t a b l e , e x c e p t f o r t h e l a s t , which marks t h e e n d o f t h e r e q u e s t s and c o n t a i n s o n l y a z e r o . The l i n e s a r e composed o f a s e r i e s o f t w o - c h a r a c t e r numbers s e p a r a t e d from e a c h o t h e r by a s p a c e . The numbers a r e i n t e r p r e t e d a s f o l l o w s :
The f i r s t number d e f i n e s t h e t y p e o f m a t r i x r e q u e s t e d (see I I a )
.
The s e c o n d number s p e c i f i e s t h e c r o s s - s e c t i o n r e q u i r e d (see I I b )
.
The t h i r d number s p e c i f i e s t h e f a c t o r h e l d c o n s t a n t ( t h e commodity f o r which t h e I / J t a b l e i s r e q u i r e d , o r t h e i m p o r t i n g o r e x p o r t i n g r e g i o n f o r which t h e I / K o r J / K t a b l e s a r e w a n t e d )
(see I a o r I b )
.
The f o u r t h and s u b s e q u e n t numbers a r e u s e d t o s e l e c t d a t a f o r s p e c i f i c y e a r s . The l a s t two c h a r a c t e r s o f t h e y e a r a r e u s e d u n l e s s t h e a l t e r n a t i v e s A,B-,Z,PU,PP a n d PM a r e r e q u e s k e d , i n which
c a s e t h e numbers 9 0 , 9 1 , 9 2 , 9 3 , 9 4 and 95 ( r e s p e c t i v e l y ) a r e t a k e n . P a i r s o f y e a r s must be s p e c i f i e d i f m a t r i x R i s t o be c a l c u l a t e d .
T h i s r e p r e s e n t s a r e q u e s t f o r a t r a d e - f l o w m a t r i x , i n I / J c r o s s - s e c t i o n , f o r food and a g r i c u l t u r a l m a t e r i a l s i n y e a r s 1955, 1960, 1970, 1971.
V. ERROR MESSAGES
Message I n t e r p r e t a t i o n
H I B A 1 The 1 s t o r 2nd number i s wrong H I B A 2 The 3 r d number i s wrong
H I B A 3 The 4 t h o r a s u b s e q u e n t number i s wrong H I B A 4 Too many numbers g i v e n
H I B A 5 Not enough numbers g i v e n
H I B A 6 The number o f y e a r s g i v e n f o r m a t r i x R i s odd
H I B A 7 The f i r s t d a t e g i v e n f o r m a t r i x R i s l a t e r t h a n t h e second
VI'. USE OF THE IBM E D I T O R
Command Meanina
top b
-
d e l ic a r r i a g e r e t u r n f i l e n e w
c/some o l d t e x t / - some new t e x t
Go t o t h e n e x t l i n e Go t o t h e p r e v i o u s l i n e
Go t o t h e b e g i n n i n g o f t h e f i l e Go t o t h e end o f t h e f i l e
Delete t h e l i n e
Change from e d i t mode t o i n p u t mode Change from i n p u t mode t o e d i t mode
Change t h e name o f t h e f i l e t o " f i l e n e w "
Change "some o l d t e x t " t o "some new t e x t "
REFERENCES
Nagy, A. (1982) I n t e r n a t i o n a l Trade A l t e r n a t i v e s f o r 1990. Col- l a b o r a t i v e P a p e r CP-82-71, I n t e r n a t i o n a l I n s t i t u t e f o r A p p l i e d Systems A n a l y s i s , Laxenburg.
UNCTAD (1979) Handbook o f I n t e r n a t i o n a l Trade and Development S t a t i s t i c s , U . N . , N e w York, 1979.