View previous topic :: View next topic |
Author |
Message |
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Tue Jun 21, 2005 11:07 am Post subject: dynamic creation of path |
|
|
hi,
im using mfcobol
im writing in select statement as :
SELECT FILE1 ASSIGN TO DD1.
in FD am writing as:
FD FILE1
VALUE OF ID IS DD1.
01 VAR PIC X(30).
and in WORKING-STORAGE SECTION.
WORKING-STORAGE SECTION.
01 DD1.
02 VAR1 PIC X(3) VALUE "C:\".
02 VAR2 PIC X(4).
02 VAR3 PIC X(6) VALUE "ABC.TXT".
and procedure division.
PROCEDURE DIVISION.
MAIN-PARA.
OPEN EXTEND FILE1.
MOVE "0001" TO VAR2.
DISPLAY DD1.
Here it is displaying the path as C:\0001\ABC.TXT. But when i open the directory, the file is not present in the directory.
can anybody pls tell me why the file is not creating even though i've opened in the EXTEND MODE. I've all the permissions in the path. |
|
Back to top |
|
|
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Tue Jun 21, 2005 12:19 pm Post subject: |
|
|
kirank,
I do not work on mfcobol, but just curious - how did the second backslash '\' get assigned. also VAR3 is 6 bytes but the value is 7 bytes ? is the above complete program - where is the write statement ? |
|
Back to top |
|
|
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Wed Jun 22, 2005 1:52 am Post subject: |
|
|
i've written the size of the variables wrongly in the query. VAR2 is x(5) and VAR3 is x(7).
when we come to WRITE statemnt, im not writing the any records to the file. My aim is to create a file while opening the file in EXTEND mode. |
|
Back to top |
|
|
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Wed Jun 22, 2005 6:50 am Post subject: |
|
|
kirank,
Are you using EXTEND mode to create a file ? Sorry, I do not understand the problem. probably a better explanation of the requirement may help someone else to answer. Thanks |
|
Back to top |
|
|
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Thu Jun 23, 2005 7:18 am Post subject: |
|
|
hi suresh,
My problem is solved. Thank you for sharing my query. |
|
Back to top |
|
|
|
|