Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TAL basic program

1,022 views
Skip to first unread message

tandem

unread,
Dec 24, 2013, 5:58:17 AM12/24/13
to
Hi ALL,

I am trying to do some basics using TAL language. Wrote a program to open a file and write "hello world" to it. Below given is the source of the program.

When I execute this program am getting a warning message. Also I am not able to view the contents of the 101 file. Can you please let me know what am I missing here ?


RUN WRTOBJ

Warning - 2,41 replied error 201 to the OPEN message - continuing




61> FUP COPY $DATA01.TEMP.INP
ERROR - $DATA01.TEMP.INP: EDITREAD ERR -1
*ABEND*
ABENDED: 1,1969



TAL PROGRAM SOURCE

?PUSHLIST, NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS0 (WRITEX
? FILE_OPEN_, READUPDATE, PROCESS_STOP_, FILE_CLOSE_)
?INSPECT, SYMBOLS
?NOLIST

-- Global variables
STRING .buffer [0:10];
INT filenum
,error;

STRING .file^name[0:18] := ["$DATA01.TEMP.INP"];


PROC main^proc MAIN;
BEGIN

error := FILE_OPEN_ (file^name:19, filenum,2,,,); -- Open file in write mode
IF error THEN
error := PROCESS_STOP_ ( , , 1);

buffer ':=' "HELLO WORLD";

CALL WRITEX ( filenum
,buffer
,11
,
, );
error := FILE_CLOSE_ ( filenum, );

error := PROCESS_STOP_ ( , , 0);

END;

dave....@gmail.com

unread,
Dec 24, 2013, 6:15:30 AM12/24/13
to
Tbe operating system is complaining that your program did not open its $receive file and read its startup message. You can do that or your code can call the INITIALIZER procedure. Edit files are viewable using Edit or Tedit or a workstation bases text editor after downloading. Programs such as UltraEdit can read and write directly to code 101 files on the NonStop.

tandem

unread,
Dec 24, 2013, 6:36:35 AM12/24/13
to
On Tuesday, 24 December 2013 16:45:30 UTC+5:30, dave....@gmail.com wrote:
> Tbe operating system is complaining that your program did not open its $receive file and read its startup message. You can do that or your code can call the INITIALIZER procedure. Edit files are viewable using Edit or Tedit or a workstation bases text editor after downloading. Programs such as UltraEdit can read and write directly to code 101 files on the NonStop.

Thank you Dave... I just added CALL INITIALIZER; to my code. Now I am able to fix the warning message. However still am not able to write the contents to the 101 file.

Also when I try to view it using fup copy command its throwing this error.

Doug Miller

unread,
Dec 24, 2013, 7:03:21 AM12/24/13
to
tandem <jayga...@gmail.com> wrote in
news:88797dcf-c8f5-4453...@googlegroups.com:

>[...]
> I am not able to view the contents of the 101 file. Can you please
> let me know what am I missing here ?
[...]
> 61> FUP COPY $DATA01.TEMP.INP
> ERROR - $DATA01.TEMP.INP: EDITREAD ERR -1
[...]
>
> CALL WRITEX ( filenum
> ,buffer
> ,11
> ,
> , );
This is the cause of the EDITREAD error when you try to FUP COPY the file: to read and
write EDIT (code 101) files, you must use the EDITREAD and EDITWRITE procedures
instead of READ and WRITE.

Rather than do this, however, *by far* the easiest solution to this problem is to change the
file code to zero, so that FUP doesn't think it's an EDIT file.

tandem

unread,
Dec 24, 2013, 8:08:30 AM12/24/13
to
On Tuesday, 24 December 2013 17:33:21 UTC+5:30, Doug Miller wrote:
> tandem wrote in news >[...] > I am not able to view the contents of the 101 file. Can you please > let me know what am I missing here ? [...] > 61> FUP COPY $DATA01.TEMP.INP > ERROR - $DATA01.TEMP.INP: EDITREAD ERR -1 [...] > > CALL WRITEX ( filenum > ,buffer > ,11 > , > , ); This is the cause of the EDITREAD error when you try to FUP COPY the file: to read and write EDIT (code 101) files, you must use the EDITREAD and EDITWRITE procedures instead of READ and WRITE. Rather than do this, however, *by far* the easiest solution to this problem is to change the file code to zero, so that FUP doesn't think it's an EDIT file.


Thanks for the inputs. I was able to write and view the contents to file succesfully. I had change the file code of the file from 101 to 0. Wonder why it didnt write the contents to 101 file.

Doug Miller

unread,
Dec 24, 2013, 9:17:17 AM12/24/13
to
tandem <jayga...@gmail.com> wrote in
news:dc8e084f-558c-49c6...@googlegroups.com:
I explained that already: to read and write EDIT (code 101) files, you must use the
EDITREAD and EDITWRITE procedures instead of READ and WRITE.

Your program certainly *did* write to the 101 file; the problem is that since you didn't use
EDITWRITE, you didn't write a *valid* 101 file. Because the file code was 101, FUP was
expecting to see a valid 101 file -- notice that the error message you got from FUP was an
EDITREAD error. If you had FUP ALTERed the file your program wrote to Code 0, you
would have been able to FUP COPY its contents successfully.

EDIT files have a specific, proprietary format, and you *cannot* read or write them
successfully using standard READ and WRITE procedures. You *must* use EDITREAD
and EDITWRITE for EDIT files.

Keith Dick

unread,
Dec 24, 2013, 10:59:23 AM12/24/13
to
I see the others have pointed out the misunderstandings you had that led to your problems/questions, so I don't need to answer them.

The bigger question, though, is why are you even bothering to try to do anything in TAL? There are only a few situations these days in which you should use TAL or pTAL. Unless you are in one of those situations, you probably are wasting time that could be better spent on something else. If you really do need to learn TAL, we'll continue to answer questions you post. I just want you to step back and consider whether this is the best way to spend your time.

Robert Hutchings

unread,
Dec 24, 2013, 8:29:44 PM12/24/13
to
Hi,

I suspect you are learning TAL because you are working on old BASE24 or CONNEX code that needs updates and/or customizations. If that is the case, you may want to consider taking a course with the NonStop Education group.

I'm not sure that we want to teach you how to write TAL code in this forum. Some people seem willing to do that while others may not be as eager. Sharing knowledge is good, but actually teaching people how to write TAL or COBOL85 or TACL is "education" in my opinion, and should be learned from educators.

I welcome any/all comments or thoughts...

dave....@gmail.com

unread,
Dec 25, 2013, 2:33:06 PM12/25/13
to
I agree that helping someone solve a problem is one thing, training them to bluff their way through an interview is another. Having spent hours interviewing candidates claiming TAL and Enscribe experience, I don't appreciate the waste of my time. Maybe the OP is simply into TAL, the Latin of computer languages :).

Robert Hutchings

unread,
Dec 25, 2013, 3:24:48 PM12/25/13
to
Yes, and BTW, this has nothing to do with "outsourcing" etc. It was just my opinion about the purpose of this forum. We want to help people with NonStop-related technical problems, but I do NOT want to teach people how to write a TAL program. That is strictly MY opinion...

red floyd

unread,
Dec 30, 2013, 6:42:16 PM12/30/13
to
On 12/25/2013 11:33 AM, dave....@gmail.com wrote:

> Maybe the OP is simply into TAL, the Latin of computer languages :).
>
Wouldn't ALGOL be the "Latin" of computer languages?

Bill Honaker

unread,
Dec 30, 2013, 7:34:49 PM12/30/13
to
Since Latin is probably the most used language over the past couple of
thousand years, I don't think either one qualifies. Unfortunately,
I'd have to propose that COBOL is probably the closest analogy.

:-)

red floyd

unread,
Dec 31, 2013, 12:00:31 PM12/31/13
to
My theory was that every European language is derived from Latin
(Yeah, I know I'm exaggerating), just like every computer language
seems to be derived from ALGOL.

COBOL is the Greek of the computer world.

TAL, on the other hand, is probably Basque or Magyar or something
like that.


wbreidbach

unread,
Dec 31, 2013, 5:01:44 PM12/31/13
to
I disagree, the northern European languages like English, Swedish, Norwegian and even German do not have their origin in Latin, there is just a bit of Latin influence. Most langurages of southern Europe like Italy, France and so on have been significantly influenced by Latin.
I do not think Algol is correct, my vote goes for COBOL (as Latin) because the Romans were very business-oriented. So Algol would fit more for the Egyptians or the Mayas which were more science-oriented than the Romans.

Randall

unread,
Jan 1, 2014, 11:59:18 PM1/1/14
to
Beg to differ on English. William (1066 AD) brought French grammar to England. While many Anglo-Saxon words survived, complex tense conjugation was introduced that had direct derivation from French, and indirect from Latin.

I would also contend that APL is a more fitting analogue for Egyptian antiquity (hieroglyphics) than either ALGOL or COBOL. PL/1 is similarly more of a root language for our purposes (TAL) than either - ALGOL is far too formal and TAL is really not at all. I would suggest that ALGOL is more of an ancestor to C, Concurrent Euclid, Ada, and, Turing; however, SNOBOL and LISP stand on their own. I did notice that no one mentioned any Macro Assembler variant.

Robert Hutchings

unread,
Jan 2, 2014, 12:51:42 PM1/2/14
to

Randall

unread,
Jan 2, 2014, 1:31:30 PM1/2/14
to
On Thursday, January 2, 2014 12:51:42 PM UTC-5, Robert Hutchings wrote:
> http://en.wikipedia.org/wiki/Generational_list_of_programming_languages#ALGOL_based

Thanks Robert. I added RPG and NEAT3, but TAL and HP's SPL are hard to place - I'm not sure the origin of SPL but will add it to the page, if you can find a reference.

Bill Honaker

unread,
Jan 2, 2014, 2:36:05 PM1/2/14
to
Other common languages for NS that would need placing somewhere would
include TACL. TCL is listed but not based on anything.

I see no referenc at all to HTML or the derived languages ASPX or JSP.
Oddly enough the only SQL listed is PL/SQL, under Ada. (not to be
confused with PL/C!)

One reference
(http://people.ku.edu/~nkinners/LangList/Extras/search.htm) says that
TAL is derived from SPL... which it says is an 'ALGOL-like
language...'

red floyd

unread,
Jan 2, 2014, 6:18:24 PM1/2/14
to
On 1/2/2014 11:36 AM, Bill Honaker wrote:

> Other common languages for NS that would need placing somewhere would
> include TACL. TCL is listed but not based on anything.

TACL should probably be listed as a standalone. It doesn't really seem
to derive from any other command processor.

> I see no referenc at all to HTML or the derived languages ASPX or JSP.
> Oddly enough the only SQL listed is PL/SQL, under Ada. (not to be
> confused with PL/C!)

HTML should be listed as derived from SGML, as should XML.

PL/SQL is not "SQL" per se, it's the stored procedure language for
Oracle.




Randall

unread,
Jan 3, 2014, 11:48:17 AM1/3/14
to
I've posted some changes to the topic on Wikipedia. Lots to be filled in. Go wild.

Also for thought, the #DELTA language inside TACL appears to be related to TECO-11, but neither is listed and hard to categorize.

Bill Honaker

unread,
Jan 3, 2014, 12:32:03 PM1/3/14
to
Since they are about as readable as APL, they could be stuck there. Or
possibly with the HP Calculator macro languages (since they do work in
a bit of RPN mode).

Randall

unread,
Jan 3, 2014, 3:27:59 PM1/3/14
to
APL has a definite philosophy, Bill. The idea of a pipeline vector set processor is more akin to SQL internal engines, however. And it's backwards (right-to-left). Nonetheless, I'm happy to keep updating the page.

red floyd

unread,
Jan 3, 2014, 3:42:55 PM1/3/14
to


The TACL page says "This article may be too technical for most readers
to understand". Have the Wikipedia editors EVER looked at any
advanced math pages?

Bill Honaker

unread,
Jan 3, 2014, 4:57:11 PM1/3/14
to
The user that marked that seems to be nontechincal.
http://en.wikipedia.org/wiki/User:Arms_%26_Hearts

And a self-proclaimed 'Anarcho-Communist'. I wouldn't put much stock
in it. You might consider removning the tag.

red floyd

unread,
Jan 3, 2014, 6:16:52 PM1/3/14
to
Not an editor, and given the politics, not worth it.

Bill Honaker

unread,
Jan 3, 2014, 6:33:45 PM1/3/14
to
On Fri, 03 Jan 2014 15:16:52 -0800, red floyd
<no.spa...@its.invalid> wrote:

>On 1/3/2014 1:57 PM, Bill Honaker wrote:
>> On Fri, 03 Jan 2014 12:42:55 -0800, red floyd
>> <no.spa...@its.invalid> wrote:
>>
>>>
>>>
>>> The TACL page says "This article may be too technical for most readers
>>> to understand". Have the Wikipedia editors EVER looked at any
>>> advanced math pages?
>>
>> The user that marked that seems to be nontechincal.
>> http://en.wikipedia.org/wiki/User:Arms_%26_Hearts
>>
>> And a self-proclaimed 'Anarcho-Communist'. I wouldn't put much stock
>> in it. You might consider removning the tag.
>>
>
>Not an editor, and given the politics, not worth it.

This forum needs a 'Like' button.

But then again, FaceBook needs a 'Don't Like' button'!

Robert Hutchings

unread,
Jan 3, 2014, 7:01:12 PM1/3/14
to
I remember hearing rumors that the #DELTA stuff was written by a guy from DEC (Digital Equipment Corp.) who worked at Tandem for a while...

0 new messages