From: <bko...@ma...> - 2002-07-23 14:01:06
|
Sorry about that, I seem to have replied to you directly instead of the list. Hopefully this will help. =20 Tell me a little more about what you are trying to do. How does the environment variable get set? =20 I think there is a way to access environment variables, but I don't = recall what it is. Others should be getting on line soon and may be able to = help better. =20 -----Original Message----- From: Joel Van Boeckel [mailto:jva...@ke...] Sent: Tuesday, July 23, 2002 9:58 AM To: Boris Kortiak Subject: RE: [Tiny-cobol-users] Dynamic assign of a file =20 The first solution "$FILENAME" doesn't work. The second does, but I have to find a solution to pass the value of the = real filename during runtime. One solution would be to have access to an environment variable in the = cobol program. Do you know if this is possible in TC ? Regards, Jo=EBl. -----Message d'origine----- De : bko...@ma... [mailto:bko...@ma...] Envoy=E9 : mardi 23 juillet 2002 15:16 =C0 : jva...@ke... Objet : RE: [Tiny-cobol-users] Dynamic assign of a file =20 -----Original Message-----=20 From: Joel Van Boeckel [ mailto:jva...@ke... <mailto:jva...@ke...> ]=20 Sent: Tuesday, July 23, 2002 5:20 AM=20 To: tin...@li...=20 Subject: [Tiny-cobol-users] Dynamic assign of a file=20 =20 SELECT FLUP-FILE=20 ASSIGN TO "/tmp/FFLUP"=20 This select statement assigns a file to a real name file.=20 Is it possible, on Linux systems, to link this file dynamically, for=20 instance by mean of an environment variable exported before execution.=20 Jo=EBl.=20 Do you mean you want something like:=20 SELECT FLUP-FILE=20 ASSIGN TO "$FLUPFILE".=20 Have you tried it? What happens?=20 Alternatively, you could do it internally:=20 SELECT FLUP-FILE=20 ASSIGN TO FLUP-FILE-NAME.=20 ...=20 01 FLUP-FILE-NAME PIC X(50).=20 ...=20 MOVE SPACES TO FLUP-FILE-NAME.=20 STRING WS-FILE-PATH DELIMITED BY " "=20 WS-FILE-NAME DELIMITED BY " "=20 WS-FILE-UID DELIMITED BY SIZE=20 INTO FLUP-FILE-NAME=20 END-STRING.=20 |