From: Carlucio L. <car...@te...> - 2009-02-27 12:02:36
|
Comando : EXIT PARAGRAPH Para adquar o padrao STD85 MF solicito a sequinte alteracao: arquivo htcobol.y de: %token ORGANIZATION OTHER OUTPUT OVERFLOW_TOK %token PADDING PAGE PAGE_COUNTER PERFORM PF PH PICTURE PLUS POINTER POSITION %token POSITIVE PREVIOUS PROCEDURE PROCEED PROGRAM PROGRAM_ID ... .. /* EXIT statement */ exit_statement: EXIT { gen_exit(0); } | EXIT PROGRAM { gen_exit(1); } ; para: %token ORGANIZATION OTHER OUTPUT OVERFLOW_TOK %token PADDING PAGE PAGE_COUNTER PARAGRAPH PERFORM PF PH PICTURE PLUS POINTER POSITION %token POSITIVE PREVIOUS PROCEDURE PROCEED PROGRAM PROGRAM_ID ... ... /* EXIT statement */ exit_statement: EXIT { gen_exit(0); } | EXIT PARAGRAPH { gen_exit(0); } | EXIT PROGRAM { gen_exit(1); } ; arquivo reswords.c : de: {"PAGE-COUNTER", PAGE_COUNTER, 0, TCOB_KW_STD}, {"PERFORM", PERFORM, 0, TCOB_KW_STD}, {"PF", PF, 0, TCOB_KW_STD}, para: {"PAGE-COUNTER", PAGE_COUNTER, 0, TCOB_KW_STD}, {"PARAGRAPH", PARAGRAPH, 0, TCOB_KW_STD85}, {"PERFORM", PERFORM, 0, TCOB_KW_STD}, {"PF", PF, 0, TCOB_KW_STD}, veja programa abaixo: identification division. program-id. paragraph01. author. Carlucio Lopes. environment division. configuration section. special-names. decimal-point is comma. data division. working-storage section. 77 wsn-parag pic 9(01). 88 wsc-parag-ok value 1 2 3. procedure division. move 1 to wsn-parag perform until wsn-parag = zero evaluate wsn-parag when 01 perform 000-parag when 02 perform 010-parag when 03 perform 020-parag when other move zero to wsn-parag end-evaluate end-perform stop run. 000-parag. display "000-parag " at 0910 accept wsn-parag at 1010 if not wsc-parag-ok display "Sai do programa" at 1110 stop " " exit paragraph end-if display "000-parag sai " at 1210. 010-parag. display "010-parag " at 0910 accept wsn-parag at 1010 if not wsc-parag-ok display "Sai do programa" at 1110 stop " " exit paragraph end-if display "010-parag sai " at 1210. 020-parag. display "020-parag " at 0910 accept wsn-parag at 1010 if not wsc-parag-ok display "Sai do programa" at 1110 stop " " exit paragraph end-if display "020-parag sai " at 1210. carlucio@carlinux:~$ htcobol -x -F -P paragraph01.cob paragraph01.cob: 28: error: syntax error, on or before 'paragraph' paragraph01.cob: 28: error: unknown or wrong statement, on or before 'paragraph' paragraph01.cob: 28: error: unknown or wrong statement, on or before 'paragraph' paragraph01.cob: 29: error: unknown or wrong statement, on or before 'end-if' paragraph01.cob: 35: error: syntax error, on or before 'paragraph' paragraph01.cob: 35: error: unknown or wrong statement, on or before 'paragraph' paragraph01.cob: 35: error: unknown or wrong statement, on or before 'paragraph' paragraph01.cob: 36: error: unknown or wrong statement, on or before 'end-if' paragraph01.cob: 42: error: syntax error, on or before 'paragraph' paragraph01.cob: 42: error: unknown or wrong statement, on or before 'paragraph' paragraph01.cob: 42: error: unknown or wrong statement, on or before 'paragraph' paragraph01.cob: 43: error: unknown or wrong statement, on or before 'end-if' carlucio@carlinux:~$ com a alteracao: carlucio@carlinux:~$ htcobol -x -F -P paragraph01.cob compilou ok. -- Carlucio Lopes-Cobolito 62-8415-8939 Tinycobol/Debian Gnu-Linux/Postgresql Novo Link PIRATARIA ENTENDA ->> http://carlinux.no-ip.info:81 |
From: David E. <de...@us...> - 2009-02-28 05:02:41
|
I do not think 'EXIT PARAGRAPH' is part of COBOL-85 standard. The COBOL 200x standard states as follows. EXIT [ PROGRAM | PARAGRAPH | SECTION | METHOD | FUNCTION | PERFORM ]. So it is probably a MF extention to the COBOL-85 standard. However, it seems to be functionally equivalent. So I have updated SF CVS (version 0.64.7) with your changes. Carlucio Lopes wrote: > Comando : EXIT PARAGRAPH > Para adquar o padrao STD85 MF solicito a sequinte alteracao: > > arquivo htcobol.y > de: > %token ORGANIZATION OTHER OUTPUT OVERFLOW_TOK > %token PADDING PAGE PAGE_COUNTER PERFORM PF PH PICTURE PLUS POINTER POSITION > %token POSITIVE PREVIOUS PROCEDURE PROCEED PROGRAM PROGRAM_ID > ... > .. > /* EXIT statement */ > exit_statement: > EXIT { gen_exit(0); } > | EXIT PROGRAM { gen_exit(1); } > ; > > para: > %token ORGANIZATION OTHER OUTPUT OVERFLOW_TOK > %token PADDING PAGE PAGE_COUNTER PARAGRAPH PERFORM PF PH PICTURE PLUS POINTER POSITION > %token POSITIVE PREVIOUS PROCEDURE PROCEED PROGRAM PROGRAM_ID > ... > ... > /* EXIT statement */ > exit_statement: > EXIT { gen_exit(0); } > | EXIT PARAGRAPH { gen_exit(0); } > | EXIT PROGRAM { gen_exit(1); } > ; > > arquivo reswords.c : > de: > {"PAGE-COUNTER", PAGE_COUNTER, 0, TCOB_KW_STD}, > {"PERFORM", PERFORM, 0, TCOB_KW_STD}, > {"PF", PF, 0, TCOB_KW_STD}, > > para: > {"PAGE-COUNTER", PAGE_COUNTER, 0, TCOB_KW_STD}, > {"PARAGRAPH", PARAGRAPH, 0, TCOB_KW_STD85}, > {"PERFORM", PERFORM, 0, TCOB_KW_STD}, > {"PF", PF, 0, TCOB_KW_STD}, > > > veja programa abaixo: > identification division. > program-id. paragraph01. > author. Carlucio Lopes. > environment division. > configuration section. > special-names. > decimal-point is comma. > data division. > working-storage section. > 77 wsn-parag pic 9(01). > 88 wsc-parag-ok value 1 2 3. > procedure division. > move 1 to wsn-parag > perform until wsn-parag = zero > evaluate wsn-parag > when 01 perform 000-parag > when 02 perform 010-parag > when 03 perform 020-parag > when other move zero to wsn-parag > end-evaluate > end-perform > stop run. > 000-parag. > display "000-parag " at 0910 > accept wsn-parag at 1010 > if not wsc-parag-ok > display "Sai do programa" at 1110 stop " " > exit paragraph > end-if > display "000-parag sai " at 1210. > 010-parag. > display "010-parag " at 0910 > accept wsn-parag at 1010 > if not wsc-parag-ok > display "Sai do programa" at 1110 stop " " > exit paragraph > end-if > display "010-parag sai " at 1210. > 020-parag. > display "020-parag " at 0910 > accept wsn-parag at 1010 > if not wsc-parag-ok > display "Sai do programa" at 1110 stop " " > exit paragraph > end-if > display "020-parag sai " at 1210. > > > carlucio@carlinux:~$ htcobol -x -F -P paragraph01.cob > paragraph01.cob: 28: error: syntax error, on or before 'paragraph' > paragraph01.cob: 28: error: unknown or wrong statement, on or before > 'paragraph' > paragraph01.cob: 28: error: unknown or wrong statement, on or before > 'paragraph' > paragraph01.cob: 29: error: unknown or wrong statement, on or before > 'end-if' > paragraph01.cob: 35: error: syntax error, on or before 'paragraph' > paragraph01.cob: 35: error: unknown or wrong statement, on or before > 'paragraph' > paragraph01.cob: 35: error: unknown or wrong statement, on or before > 'paragraph' > paragraph01.cob: 36: error: unknown or wrong statement, on or before > 'end-if' > paragraph01.cob: 42: error: syntax error, on or before 'paragraph' > paragraph01.cob: 42: error: unknown or wrong statement, on or before > 'paragraph' > paragraph01.cob: 42: error: unknown or wrong statement, on or before > 'paragraph' > paragraph01.cob: 43: error: unknown or wrong statement, on or before > 'end-if' > carlucio@carlinux:~$ > > com a alteracao: > carlucio@carlinux:~$ htcobol -x -F -P paragraph01.cob > > compilou ok. > > |
From: vince c. <vb...@bt...> - 2009-02-28 11:07:06
|
According to my MF manual, Paragraph is a MF extention in a docuement that has defs for 74, 85 and other standards listed. (Micro Focus Cobol Language reference issue 13 April 93). Vince On Saturday 28 February 2009, David Essex wrote: > I do not think 'EXIT PARAGRAPH' is part of COBOL-85 standard. > > The COBOL 200x standard states as follows. > > EXIT [ PROGRAM | PARAGRAPH | SECTION | METHOD | FUNCTION | PERFORM ]. > > So it is probably a MF extention to the COBOL-85 standard. > > However, it seems to be functionally equivalent. > So I have updated SF CVS (version 0.64.7) with your changes. > > Carlucio Lopes wrote: > > Comando : EXIT PARAGRAPH > > Para adquar o padrao STD85 MF solicito a sequinte alteracao: > > > > arquivo htcobol.y > > de: > > %token ORGANIZATION OTHER OUTPUT OVERFLOW_TOK > > %token PADDING PAGE PAGE_COUNTER PERFORM PF PH PICTURE PLUS POINTER > > POSITION %token POSITIVE PREVIOUS PROCEDURE PROCEED PROGRAM PROGRAM_ID > > ... > > .. > > /* EXIT statement */ > > exit_statement: > > EXIT { gen_exit(0); } > > > > | EXIT PROGRAM { gen_exit(1); } > > > > ; > > > > para: > > %token ORGANIZATION OTHER OUTPUT OVERFLOW_TOK > > %token PADDING PAGE PAGE_COUNTER PARAGRAPH PERFORM PF PH PICTURE PLUS > > POINTER POSITION %token POSITIVE PREVIOUS PROCEDURE PROCEED PROGRAM > > PROGRAM_ID > > ... > > ... > > /* EXIT statement */ > > exit_statement: > > EXIT { gen_exit(0); } > > > > | EXIT PARAGRAPH { gen_exit(0); } > > | EXIT PROGRAM { gen_exit(1); } > > > > ; > > > > arquivo reswords.c : > > de: > > {"PAGE-COUNTER", PAGE_COUNTER, 0, TCOB_KW_STD}, > > {"PERFORM", PERFORM, 0, TCOB_KW_STD}, > > {"PF", PF, 0, TCOB_KW_STD}, > > > > para: > > {"PAGE-COUNTER", PAGE_COUNTER, 0, TCOB_KW_STD}, > > {"PARAGRAPH", PARAGRAPH, 0, TCOB_KW_STD85}, > > {"PERFORM", PERFORM, 0, TCOB_KW_STD}, > > {"PF", PF, 0, TCOB_KW_STD}, > > > > > > veja programa abaixo: > > identification division. > > program-id. paragraph01. > > author. Carlucio Lopes. > > environment division. > > configuration section. > > special-names. > > decimal-point is comma. > > data division. > > working-storage section. > > 77 wsn-parag pic 9(01). > > 88 wsc-parag-ok value 1 2 3. > > procedure division. > > move 1 to wsn-parag > > perform until wsn-parag = zero > > evaluate wsn-parag > > when 01 perform 000-parag > > when 02 perform 010-parag > > when 03 perform 020-parag > > when other move zero to wsn-parag > > end-evaluate > > end-perform > > stop run. > > 000-parag. > > display "000-parag " at 0910 > > accept wsn-parag at 1010 > > if not wsc-parag-ok > > display "Sai do programa" at 1110 stop " " > > exit paragraph > > end-if > > display "000-parag sai " at 1210. > > 010-parag. > > display "010-parag " at 0910 > > accept wsn-parag at 1010 > > if not wsc-parag-ok > > display "Sai do programa" at 1110 stop " " > > exit paragraph > > end-if > > display "010-parag sai " at 1210. > > 020-parag. > > display "020-parag " at 0910 > > accept wsn-parag at 1010 > > if not wsc-parag-ok > > display "Sai do programa" at 1110 stop " " > > exit paragraph > > end-if > > display "020-parag sai " at 1210. > > > > > > carlucio@carlinux:~$ htcobol -x -F -P paragraph01.cob > > paragraph01.cob: 28: error: syntax error, on or before 'paragraph' > > paragraph01.cob: 28: error: unknown or wrong statement, on or before > > 'paragraph' > > paragraph01.cob: 28: error: unknown or wrong statement, on or before > > 'paragraph' > > paragraph01.cob: 29: error: unknown or wrong statement, on or before > > 'end-if' > > paragraph01.cob: 35: error: syntax error, on or before 'paragraph' > > paragraph01.cob: 35: error: unknown or wrong statement, on or before > > 'paragraph' > > paragraph01.cob: 35: error: unknown or wrong statement, on or before > > 'paragraph' > > paragraph01.cob: 36: error: unknown or wrong statement, on or before > > 'end-if' > > paragraph01.cob: 42: error: syntax error, on or before 'paragraph' > > paragraph01.cob: 42: error: unknown or wrong statement, on or before > > 'paragraph' > > paragraph01.cob: 42: error: unknown or wrong statement, on or before > > 'paragraph' > > paragraph01.cob: 43: error: unknown or wrong statement, on or before > > 'end-if' > > carlucio@carlinux:~$ > > > > com a alteracao: > > carlucio@carlinux:~$ htcobol -x -F -P paragraph01.cob > > > > compilou ok. > > --------------------------------------------------------------------------- >--- Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing > the Enterprise -Strategies to boost innovation and cut costs with open > source participation -Receive a $600 discount off the registration fee with > the source code: SFAD http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users -- IMPORTANT – This email and the information in it may be confidential, legally privileged and/or protected by law. It is intended solely for the use of the person to whom it is addressed. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Please also delete all copies of this email and any attachments from your system. We cannot guarantee the security or confidentiality of email communications. We do not accept any liability for losses or damages that you may suffer as a result of your receipt of this email including but not limited to computer service or system failure, access delays or interruption, data non-delivery or mis-delivery, computer viruses or other harmful components. Copyright in this email and any attachments belongs to Applewood Computers. Should you communicate with anyone at Applewood Computers by email, you consent to us monitoring and reading any such correspondence. Nothing in this email shall be taken or read as suggesting, proposing or relating to any agreement concerted practice or other practice that could infringe UK or EC competition legislation. Dykegrove Limited T/A Applewood Computers is a company registered in England and Wales (number 01681349) whose registered office is at Applewood House, Epping Road, Roydon, Essex, CM19 5DA |
From: Carlucio L. <car...@te...> - 2009-02-28 16:32:47
|
On Sat, 28 Feb 2009 00:01:01 -0500 David Essex <de...@us...> wrote: > I do not think 'EXIT PARAGRAPH' is part of COBOL-85 standard. > > The COBOL 200x standard states as follows. > > EXIT [ PROGRAM | PARAGRAPH | SECTION | METHOD | FUNCTION | PERFORM ]. > > So it is probably a MF extention to the COBOL-85 standard. > > However, it seems to be functionally equivalent. > So I have updated SF CVS (version 0.64.7) with your changes. thanks, -- Carlucio Lopes-Cobolito 62-8415-8939 Tinycobol/Debian Gnu-Linux/Postgresql Novo Link PIRATARIA ENTENDA ->> http://carlinux.no-ip.info:81 |