home *** CD-ROM | disk | FTP | other *** search
- /* FULL_JOURNAL.rexx version 1.1 */
- /* This macro can be run from the CLI, SHELL or WorkBench and */
- /* acts on a text or word processor based citation database from */
- /* which you wish to export full journal names. The macro writes a */
- /* text file with the journal names of each citation/record on a */
- /* separate line. */
-
- /* open the citation text file (database) for import */
- /* NOTE: change the disk/drive designations below to suit your setup */
- in_text = getfile(,,'ram:',,'Select citation import file');
- if (in_text = '') then exit;
- if (open(importfile,in_text,'R') ~= 1) then;
- do;
- say 'I could not open the file ' || in_text || ' for importing.';
- exit;
- end;
-
- /* open the text file for export */
- out_text = getfile(,,'ram:',,'Select export file name');
- if (out_text = '') then exit;
- if (open(exportfile,out_text,'W') ~= 1) then;
- do;
- say 'I could not open the file ' || out_text || ' for exporting.';
- exit;
- end;
-
-
- /* get the first record */
- do loop = 1 to 5;
- rec.loop.value = readln(importfile);
- end;
-
-
- /* export the journal name for each record/citation in the database */
- do while (~EOF(importfile));
- Full_Journal = rec.5.value;
- say Full_Journal;
- foo = writeln(exportfile,Full_Journal);
-
-
- /* get the next record */
- do loop = 1 to 5;
- rec.loop.value = readln(importfile);
- end;
- end;
-
- /* exit macro */
- say 'Exported citation journal list in file ' || out_text;
- exit;
-