MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dynamic creation of path

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
kirank
Beginner


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Tue Jun 21, 2005 11:07 am    Post subject: dynamic creation of path Reply with quote

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
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Tue Jun 21, 2005 12:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
kirank
Beginner


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Wed Jun 22, 2005 1:52 am    Post subject: Reply with quote

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
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Wed Jun 22, 2005 6:50 am    Post subject: Reply with quote

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
View user's profile Send private message
kirank
Beginner


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Thu Jun 23, 2005 7:18 am    Post subject: Reply with quote

hi suresh,

My problem is solved. Thank you for sharing my query.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group