OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-43
Writing a File: TAL Programming Example
38 ?NOCODE
39
40 !----------------------------------------------------------------------!
41 ! Global data declarations !
42 !----------------------------------------------------------------------!
43
44 !----------------------------------------------------------------------!
45 ! Macro for word addressing !
46 !----------------------------------------------------------------------!
47
48 DEFINE SADDR( x ) = (@x '<<' 1)#; ! String address of word object !
49
50 !----------------------------------------------------------------------!
51 ! Miscellaneous literals !
52 !----------------------------------------------------------------------!
53
54 LITERAL ANYEVENT = -1; ! Wait for receipt of any OSI/FTAM evt !
55 LITERAL MAX_BUF = 1000; ! Buffer size used for sending data !
56 LITERAL MAX_REC = 134; ! Max record size for writing !
57 LITERAL NOCEPI = -1; ! Uninitialized or invalid CEPI !
58 LITERAL WAIT_FOREVER = -1D; ! Wait indefinitely for OSI/FTAM event !
59 LITERAL CRLF_len = 2D; ! Carriage return and line feed length !
60 LITERAL BASE = 10; ! Base parameter for Guardian DNUMOUT !
61 LITERAL NUM_ELEM = 5; ! No. of elements in ae-title/doc-type !
62
63
64 !---------------------------------------------------------------------!
65 ! Environment-specific fields !
66 !You will need to change these fields to reflect your FTAM environment.!
67 ! LOCAL_FILE_NAME must be a valid Guardian file, and remote_file_name !
68 ! must contain a file name valid for the remote system.In this example,!
69 ! remote_file_name is also a Guardian file. ftam_doc_type is set to !
70 ! the FTAM-1 document type and should not be changed. If you change !
71 ! values for any of these fields, adjust the length of the !
72 ! corresponding variables (array size) accordingly. !
73 !---------------------------------------------------------------------!
74
75 STRING .EXT local_appl_name[0:4] := "APPL1";
76 STRING .EXT responding_appl_name[0:4] := "APPL2";