gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] opening variable named files programatically


From: Patrick
Subject: Re: [open-cobol-list] opening variable named files programatically
Date: Sun, 23 Jun 2013 19:01:49 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

Hi Wim

It does help thanks! I also received a code snippet via PM. I am off and running. Thanks again-Patrick

On 13-06-23 06:36 PM, Wim Niemans wrote:
See http://opencobol.add1tocobol.com/OpenCOBOL%20Programmers%20Guide.pdf

In openCobol you can write

SELECT myFILE ASSIGN TO DISK myFileName.

Where myFileName is a working-storage item containing the full path and 
filename.

Hope this helps.


Op 23 jun. 2013, om 20:11 heeft Patrick het volgende geschreven:

Hi Everyone

I haven't posted for a month of more but I am plugging away with open
Cobol every minute I can and loving it.

I have hit a roadblock, actually two, though

I am creating a program to help my son with his apraxia. He has a
terrible time sequencing sounds. I believe that the English language is
complicating his issues. There is a very poor mapping of sounds to the
written the language and he is very visual.

I have spent quite some time making a respelling system for him. It is
based on IPA. The international phonetic alphabet writes how words
should be spoken.

For instance fox in IPA is fɒks.

There are too many characters in IPA to teach my son and there are too
many similar characters which could confuse regular spelling. I have
been trying to create a respelling system that is based on 44 sightwords
I will teach him. I want him to be able to say parts of words.

So for instance, the A in face is different then the A in cat. Rather
then using complex characters I want to print cat and face with the "A"
highlighted and the rest of the word in lowlight, the whole word itself
will become the special linguistic "character".

I have created 25000 files that look like this file named fox

fɒks
Fish
hOt
Kick
Sink


I want to read through the file line by line and call procedures to
print sightwords stacked in such a way that they look like a vertical
cross word puzzle word. His respelling system will be written
vertically. The F in fish will be directly over the O in hot, the K in
kick and the S in sink. f O K S will all be in the same color and the
rest of the letters will be dim. The first line will not be printed,
it's the IPA transcription and is there so I can error check.

I don't think it will be so hard to do this once I figure out how to
open the files but right now I am stuck.

My first problem is being able to open files not hardcoded in the FD
section. I haven't come across any examples of this. When he(or I) type
in "lime" in an entry field, I want libcob to search through 25K files
to open the correct one on the fly. and without any hardcoding. I don't
know how to do this.

I don't want to have to have my cobol executable mixed in with 25K other
files too. I can't seem to figure out how to open a file by it's full
Linux path name.

I found this thread:
http://www.opencobol.org/modules/newbb/viewtopic.php?topic_id=1358&forum=1&viewmode=flat&order=ASC&start=10

and found Brian's suggestion and did this:

export LD_RUN_PATH=/cob/lookup

(I made a cob directory after root to keep the path name short)

if I echo $LD_RUN_PATH I get the correct results.

I have hardcoded a file named "food" for now into the program but it is
not yet being found, I get error 35.

Could anyone point me to some more resources so I can read about how to
do these two things?

Thanks for reading-Patrick


















------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list




reply via email to

[Prev in Thread] Current Thread [Next in Thread]