Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.cobol

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-24-2012, 07:09 PM
federico
Guest
 
Posts: n/a
Default fujitsu 5.0 standard POST getting value

Hi all, I would like to test a cobol standard for use cgi with fujitsu
cobol. The source is going to write and read from standard input/
output using simple display and accept.

The display statements run fine and I can see into my web server the
html correctly.

After a POST I am using the accept from console for getting the value
but the compiler issue this mistake:

Exception Number : JMP0209I-U [PID:00000484 TID:00000EC4] CANNOT
ACCEPT/DISPLAY FROM SYSTEM CONSOLE. 'READ' 109. PGM=WEB ADR=0040156C

The cobol source is really simple just it's a console that use display
for put html and
an standard accept for getting input value.

I know that fujitsu use cgi call to manage a web page and I USE them
but this time I wanted use some of cobol standard without any
specific compiler features.

Thanks for your advices.

Federico
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 05-24-2012, 11:33 PM
Richard
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

On May 25, 7:09*am, federico <federico.pri...@gmail.com> wrote:
> Hi all, I would like to test a cobol standard for use cgi with fujitsu
> cobol. The source is going to write and read from standard input/
> output using simple display and accept.
>
> The display statements run fine and I can see into my web server the
> html correctly.
>
> After a POST I am using the accept from console for getting the value
> but the compiler issue this mistake:
>
> Exception Number *: JMP0209I-U [PID:00000484 TID:00000EC4] CANNOT
> ACCEPT/DISPLAY FROM SYSTEM CONSOLE. 'READ' 109. PGM=WEB ADR=0040156C
>
> The cobol source is really simple just it's a console that use display
> for put html *and
> an standard accept for getting input value.
>
> I know that fujitsu use cgi call to manage a web page and I USE them
> but this time I wanted use some of *cobol standard without any
> specific compiler features.
>
> Thanks for your advices.


Operating System ? Web Server ? Source Code ?

Looking at my version 4 Fujitsu COBOL 4.0 User Guide, Chapter 11 has
some notes on Accept/Display and how it relates to SYSIN/SYSOUT and
CONSOLE.

In particular it says that you can't use SYSIN/SYSOUT and CONSOLE in
the same program.



Reply With Quote
  #3 (permalink)  
Old 05-25-2012, 06:09 AM
federico
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

>
> Operating System ? Web Server ? Source Code ?
>
> Looking at my version 4 Fujitsu COBOL 4.0 User Guide, Chapter 11 has
> some notes on Accept/Display and how it relates to SYSIN/SYSOUT and
> CONSOLE.
>
> In particular it says that you can't use SYSIN/SYSOUT and CONSOLE in
> the same program.



Windows xp, Apache webserver, the start source I used for is for
opencobol (and it runs perfectly)

http://opencobol.add1tocobol.com/#ho...ncobol-for-cgi

I only changed the read from a file assigned to keyboard (features
This not available at fujtisu)

with:

accept datavar from console.

The fujtisu version is listed below

Thanks
Federico


000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. WEB.
000030
000040 ENVIRONMENT DIVISION.
000050 CONFIGURATION SECTION.
000060 SOURCE-COMPUTER. PC-IBM.
000070 OBJECT-COMPUTER. PC-IBM.
000080 SPECIAL-NAMES.
000090
000091 ENVIRONMENT-NAME IS ARG-NAME
000110 ENVIRONMENT-VALUE IS ARG-VALUE.
000120
000130 INPUT-OUTPUT SECTION.
000140 FILE-CONTROL.
000150 SELECT WEBINPUT ASSIGN TO SYSIN.
000160
000170 DATA DIVISION.
000180 FILE SECTION.
000190 FD WEBINPUT.
000200 01 RECINPUT PIC X(1024).
000210
000220 WORKING-STORAGE SECTION.
000230 77 FINE-FILE PIC X.
000240 78 NAME-COUNT VALUE 34.
000250 01 NEWLINE PIC X VALUE X'0A'.
000260 01 NAME-INDEX PIC 99 USAGE COMP-5.
000270 01 VALUE-STRING PIC X(256).
000280 01 DATI PIC X(1024).
000290 01 ENVIRONMENT-NAMES.
000300 02 NAME-STRINGS.
000310 03 FILLER PIC X(20) VALUE 'AUTH_TYPE'.
000320 03 FILLER PIC X(20) VALUE 'CONTENT_LENGTH'.
000330 03 FILLER PIC X(20) VALUE 'CONTENT_TYPE'.
000340 03 FILLER PIC X(20) VALUE 'DOCUMENT_ROOT'.
000350 03 FILLER PIC X(20) VALUE 'GATEWAY_INTERFACE'.
000360 03 FILLER PIC X(20) VALUE 'HTTP_ACCEPT'.
000370 03 FILLER PIC X(20) VALUE 'HTTP_ACCEPT_CHARSET'.
000380 03 FILLER PIC X(20) VALUE 'HTTP_ACCEPT_ENCODING'.
000390 03 FILLER PIC X(20) VALUE 'HTTP_ACCEPT_LANGUAGE'.
000400 03 FILLER PIC X(20) VALUE 'HTTP_COOKIE'.
000410 03 FILLER PIC X(20) VALUE 'HTTP_CONNECTION'.
000420 03 FILLER PIC X(20) VALUE 'HTTP_HOST'.
000430 03 FILLER PIC X(20) VALUE 'HTTP_REFERER'.
000440 03 FILLER PIC X(20) VALUE 'HTTP_USER_AGENT'.
000450 03 FILLER PIC X(20) VALUE 'LIB_PATH'.
000460 03 FILLER PIC X(20) VALUE 'PATH'.
000470 03 FILLER PIC X(20) VALUE 'PATH_INFO'.
000480 03 FILLER PIC X(20) VALUE 'PATH_TRANSLATED'.
000490 03 FILLER PIC X(20) VALUE 'QUERY_STRING'.
000500 03 FILLER PIC X(20) VALUE 'REMOTE_ADDR'.
000510 03 FILLER PIC X(20) VALUE 'REMOTE_HOST'.
000520 03 FILLER PIC X(20) VALUE 'REMOTE_IDENT'.
000530 03 FILLER PIC X(20) VALUE 'REMOTE_PORT'.
000540 03 FILLER PIC X(20) VALUE 'REQUEST_METHOD'.
000550 03 FILLER PIC X(20) VALUE 'REQUEST_URI'.
000560 03 FILLER PIC X(20) VALUE 'SCRIPT_FILENAME'.
000570 03 FILLER PIC X(20) VALUE 'SCRIPT_NAME'.
000580 03 FILLER PIC X(20) VALUE 'SERVER_ADDR'.
000590 03 FILLER PIC X(20) VALUE 'SERVER_ADMIN'.
000600 03 FILLER PIC X(20) VALUE 'SERVER_NAME'.
000610 03 FILLER PIC X(20) VALUE 'SERVER_PORT'.
000620 03 FILLER PIC X(20) VALUE 'SERVER_PROTOCOL'.
000630 03 FILLER PIC X(20) VALUE 'SERVER_SIGNATURE'.
000640 03 FILLER PIC X(20) VALUE 'SERVER_SOFTWARE'.
000650 02 FILLER REDEFINES NAME-STRINGS.
000660 03 NAME-STRING PIC X(20) OCCURS NAME-COUNT TIMES.
000670
000680 PROCEDURE DIVISION.
000690
000700* ALWAYS SEND OUT THE CONTENT-TYPE BEFORE ANY OTHER IO
000710
000720 DISPLAY
000730 "CONTENT-TYPE: TEXT/HTML"
000740 NEWLINE
000750 END-DISPLAY.
000760 DISPLAY
000770 "<HTML><BODY>"
000780 END-DISPLAY.
000790 DISPLAY
000800 "<H3>CGI ENVIRONMENT WITH FUJTISU</H3>"
000810 END-DISPLAY.
000820 DISPLAY
000830 '<A HREF="/WEB.HTML">TO WEB.HTML</A>'
000840 "<P><TABLE>"
000850 END-DISPLAY.
000860
000870 PERFORM VARYING NAME-INDEX FROM 1 BY 1
000880 UNTIL NAME-INDEX > NAME-COUNT
000890
000900 DISPLAY NAME-STRING(NAME-INDEX) UPON ARG-NAME
000910
000920 ACCEPT VALUE-STRING FROM ARG-VALUE
000930 ON EXCEPTION MOVE "not available" to VALUE-STRING
000940 END-ACCEPT
000950
000960 DISPLAY
000970 "<TR><TD>"
000980 NAME-STRING(NAME-INDEX)
000990 ": </TD><TD>"
001000 VALUE-STRING(1:30)
001010 "</TD></TR>"
001020 END-DISPLAY
001030
001040 IF (NAME-STRING(NAME-INDEX) = "REQUEST_METHOD")
001050 AND (VALUE-STRING = "POST")
001060
001086
001087 ACCEPT DATI FROM CONSOLE
001088
001089* MOVE SPACES TO FINE-FILE
001090*
001091* OPEN INPUT WEBINPUT
001092*
001093* DISPLAY
001094* '<TR><TD ALIGN="RIGHT">'
001095* "OPEN FILE </TD><TD>"
001096* "</TD></TR>"
001097* END-DISPLAY
001098*
001099* PERFORM UNTIL FINE-FILE = "S"
001110* READ WEBINPUT AT END MOVE SPACES TO RECINPUT
001130* MOVE "S" TO FINE-FILE
001131*
001132* IF FINE-FILE NOT = "S"
001133* DISPLAY
001134* '<TR><TD ALIGN="RIGHT">'
001135* "DATI LETTI:</TD><TD>"
001136* RECINPUT
001137* "</TD></TR>"
001138* END-DISPLAY
001139*
001140* ELSE
001141*
001142* DISPLAY
001143* '<TR><TD ALIGN="RIGHT">'
001144* "FINE FILE</TD><TD>"
001145*
001146* "</TD></TR>"
001147* END-DISPLAY
001148*
001150*
001151* END-IF
001153*
001154* END-READ
001155* END-PERFORM
001160* CLOSE WEBINPUT
001170
001180 DISPLAY
001190 '<TR><TD ALIGN="RIGHT">'
001200 "DATI LETTI:</TD><TD>"
001210 DATI
001220 "</TD></TR>"
001230 END-DISPLAY
001240 END-IF
001250 END-PERFORM.
001260 DISPLAY "</TABLE></P></BODY></HTML>"
001270 END-DISPLAY.
001280 GOBACK.



Reply With Quote
  #4 (permalink)  
Old 05-25-2012, 08:26 PM
Richard
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

On May 25, 6:09*pm, federico <federico.pri...@gmail.com> wrote:
> > Operating System ? Web Server ? Source Code ?

>
> > Looking at my version 4 Fujitsu COBOL 4.0 User Guide, Chapter 11 has
> > some notes on Accept/Display and how it relates to SYSIN/SYSOUT and
> > CONSOLE.

>
> > In particular it says that you can't use SYSIN/SYSOUT and CONSOLE in
> > the same program.

>
> Windows xp, Apache webserver, the start source I used for is for
> opencobol (and it runs perfectly)
>
> http://opencobol.add1tocobol.com/#ho...ncobol-for-cgi
>
> I only changed the read from a file assigned to keyboard (features
> This not available at fujtisu)
>
> with:
>
> accept datavar from console.


In case you missed it the first time:

"""Looking at my version 4 Fujitsu COBOL 4.0 User Guide, Chapter 11
has some notes on Accept/Display and how it relates to SYSIN/SYSOUT
and CONSOLE.

In particular it says that you can't use SYSIN/SYSOUT and CONSOLE in
the same program."""

I first wrote COBOL CGI stuff a couple of decades ago using MicroSoft
COBOL 4.5 on OS/2 with the Netscape (I think) Webserver. I had it
running under DRI's Multiuser-DOS as DOS programs, Windows 3.x and 95
with Xitami server, Unix with Netscape and Linux with Apache.

You can find an early input module on Google groups by searching for
'cgiinput.cbl'.

OS/2 needed a CALL to a system routine as the ACCEPT statement could
not be made to complete. Windows (3.1 and 95) needed a completely
different routine. I did have it working with one server on 3.1 now
lost in the dim past, but shifted to Xitami and this could provide all
the environment and input on a disk file with the output also being
sent by a disk file.

I did have it running on Fujitsu COBOL on Windows with Xitami and
Linux with Xitami or Apache a decade or more ago.

When running on Linux/Apache for a POST it does an 'ACCEPT Request-
Buffer(1:Content-Size)'. Content-Size comes from the environment
variables and the size is vital as otherwise the ACCEPT won't
terminate. This ACCEPT does use a 'FROM CONSOLE' when compiled with MS/
MF COBOL but for Fujitsu it is removed.

Fujitsu/Windows/Apache was not a combination that I tried. Win95/
Xitami worked for me and I moved to all Linux soon after.

> The fujtisu version is listed below
>
> Thanks
> Federico
>
> 000010 IDENTIFICATION DIVISION.
> 000020 PROGRAM-ID. WEB.
> 000030
> 000040 ENVIRONMENT DIVISION.
> 000050 CONFIGURATION SECTION.
> 000060 SOURCE-COMPUTER. * * * *PC-IBM.
> 000070 OBJECT-COMPUTER. * * * *PC-IBM.
> 000080 SPECIAL-NAMES.
> 000090
> 000091 * * * * *ENVIRONMENT-NAME * IS ARG-NAME
> 000110 * * * * *ENVIRONMENT-VALUE *IS ARG-VALUE.
> 000120
> 000130 INPUT-OUTPUT SECTION.
> 000140 FILE-CONTROL.
> 000150 * * SELECT WEBINPUT ASSIGN TO SYSIN.
> 000160
> 000170 DATA DIVISION.
> 000180 FILE SECTION.
> 000190 FD WEBINPUT.
> 000200 01 RECINPUT * * * *PIC X(1024).
> 000210
> 000220 WORKING-STORAGE SECTION.
> 000230 77 FINE-FILE * * * PIC X.
> 000240 78 NAME-COUNT * * *VALUE 34.
> 000250 01 NEWLINE * * * * PIC X * VALUE X'0A'.
> 000260 01 NAME-INDEX * * *PIC 99 USAGE COMP-5.
> 000270 01 VALUE-STRING * *PIC X(256).
> 000280 01 DATI * * * * * *PIC X(1024).
> 000290 01 ENVIRONMENT-NAMES.
> 000300 * *02 NAME-STRINGS.
> 000310 * * * 03 FILLER * *PIC X(20) VALUE 'AUTH_TYPE'.
> 000320 * * * 03 FILLER * *PIC X(20) VALUE 'CONTENT_LENGTH'.
> 000330 * * * 03 FILLER * *PIC X(20) VALUE 'CONTENT_TYPE'.
> 000340 * * * 03 FILLER * *PIC X(20) VALUE 'DOCUMENT_ROOT'.
> 000350 * * * 03 FILLER * *PIC X(20) VALUE 'GATEWAY_INTERFACE'.
> 000360 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_ACCEPT'.
> 000370 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_ACCEPT_CHARSET'..
> 000380 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_ACCEPT_ENCODING'.
> 000390 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_ACCEPT_LANGUAGE'.
> 000400 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_COOKIE'.
> 000410 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_CONNECTION'.
> 000420 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_HOST'.
> 000430 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_REFERER'.
> 000440 * * * 03 FILLER * *PIC X(20) VALUE 'HTTP_USER_AGENT'.
> 000450 * * * 03 FILLER * *PIC X(20) VALUE 'LIB_PATH'.
> 000460 * * * 03 FILLER * *PIC X(20) VALUE 'PATH'.
> 000470 * * * 03 FILLER * *PIC X(20) VALUE 'PATH_INFO'.
> 000480 * * * 03 FILLER * *PIC X(20) VALUE 'PATH_TRANSLATED'.
> 000490 * * * 03 FILLER * *PIC X(20) VALUE 'QUERY_STRING'.
> 000500 * * * 03 FILLER * *PIC X(20) VALUE 'REMOTE_ADDR'.
> 000510 * * * 03 FILLER * *PIC X(20) VALUE 'REMOTE_HOST'.
> 000520 * * * 03 FILLER * *PIC X(20) VALUE 'REMOTE_IDENT'.
> 000530 * * * 03 FILLER * *PIC X(20) VALUE 'REMOTE_PORT'.
> 000540 * * * 03 FILLER * *PIC X(20) VALUE 'REQUEST_METHOD'.
> 000550 * * * 03 FILLER * *PIC X(20) VALUE 'REQUEST_URI'.
> 000560 * * * 03 FILLER * *PIC X(20) VALUE 'SCRIPT_FILENAME'.
> 000570 * * * 03 FILLER * *PIC X(20) VALUE 'SCRIPT_NAME'.
> 000580 * * * 03 FILLER * *PIC X(20) VALUE 'SERVER_ADDR'.
> 000590 * * * 03 FILLER * *PIC X(20) VALUE 'SERVER_ADMIN'.
> 000600 * * * 03 FILLER * *PIC X(20) VALUE 'SERVER_NAME'.
> 000610 * * * 03 FILLER * *PIC X(20) VALUE 'SERVER_PORT'.
> 000620 * * * 03 FILLER * *PIC X(20) VALUE 'SERVER_PROTOCOL'.
> 000630 * * * 03 FILLER * *PIC X(20) VALUE 'SERVER_SIGNATURE'.
> 000640 * * * 03 FILLER * *PIC X(20) VALUE 'SERVER_SOFTWARE'.
> 000650 * *02 FILLER REDEFINES NAME-STRINGS.
> 000660 * * * 03 NAME-STRING * PIC X(20) OCCURS NAME-COUNT TIMES.
> 000670
> 000680 PROCEDURE DIVISION.
> 000690
> 000700* ALWAYS SEND OUT THE CONTENT-TYPE BEFORE ANY OTHER IO
> 000710
> 000720 * * *DISPLAY
> 000730 * * * * *"CONTENT-TYPE: TEXT/HTML"
> 000740 * * * * *NEWLINE
> 000750 * * *END-DISPLAY.
> 000760 * * *DISPLAY
> 000770 * * * * *"<HTML><BODY>"
> 000780 * * *END-DISPLAY.
> 000790 * * *DISPLAY
> 000800 * * * * *"<H3>CGI ENVIRONMENT WITH FUJTISU</H3>"
> 000810 * * *END-DISPLAY.
> 000820 * * *DISPLAY
> 000830 * * * * *'<A HREF="/WEB.HTML">TO WEB.HTML</A>'
> 000840 * * * * *"<P><TABLE>"
> 000850 * * *END-DISPLAY.
> 000860
> 000870 * * *PERFORM VARYING NAME-INDEX FROM 1 BY 1
> 000880 * * * * *UNTIL NAME-INDEX > NAME-COUNT
> 000890
> 000900 * * * * *DISPLAY NAME-STRING(NAME-INDEX) UPON ARG-NAME
> 000910
> 000920 * * * * *ACCEPT VALUE-STRING FROM ARG-VALUE
> 000930 * * * * * ON EXCEPTION MOVE "not available" to VALUE-STRING
> 000940 * * * * *END-ACCEPT
> 000950
> 000960 * * * * *DISPLAY
> 000970 * * * * * * * * *"<TR><TD>"
> 000980 * * * * * * * * *NAME-STRING(NAME-INDEX)
> 000990 * * * * * * * * *": </TD><TD>"
> 001000 * * * * * * * * *VALUE-STRING(1:30)
> 001010 * * * * * * * * *"</TD></TR>"
> 001020 * * * * *END-DISPLAY
> 001030
> 001040 * * * * *IF (NAME-STRING(NAME-INDEX) = "REQUEST_METHOD")
> 001050 * * * * * * * *AND (VALUE-STRING = "POST")
> 001060
> 001086
> 001087 * * * * * * * * *ACCEPT DATI FROM CONSOLE
> 001088
> 001089* * * * * * * * *MOVE SPACES * TO FINE-FILE
> 001090*
> 001091* * * * * * * * *OPEN INPUT WEBINPUT
> 001092*
> 001093* * * * * * * * * * * DISPLAY
> 001094* * * * * * * * * * * * * '<TR><TD ALIGN="RIGHT">'
> 001095* * * * * * * * * * * * * "OPEN FILE </TD><TD>"
> 001096* * * * * * * * * * * * * "</TD></TR>"
> 001097* * * * * * * * * * * END-DISPLAY
> 001098*
> 001099* * * * * * * * *PERFORM UNTIL FINE-FILE = "S"
> 001110* * * * * * * * *READ WEBINPUT AT END MOVE SPACES TO RECINPUT
> 001130* * * * * * * * * * * * * * MOVE "S" * *TO FINE-FILE
> 001131*
> 001132* * * * * * * * * IF FINE-FILE NOT = "S"
> 001133* * * * * * * * * * *DISPLAY
> 001134* * * * * * * * * * * * * '<TR><TD ALIGN="RIGHT">'
> 001135* * * * * * * * * * * * * "DATI LETTI:</TD><TD>"
> 001136* * * * * * * * * * * * * RECINPUT
> 001137* * * * * * * * * * * * * "</TD></TR>"
> 001138* * * * * * * * * * * END-DISPLAY
> 001139*
> 001140* * * * * * * * * *ELSE
> 001141*
> 001142* * * * * * * * * * * DISPLAY
> 001143* * * * * * * * * * * * * '<TR><TD ALIGN="RIGHT">'
> 001144* * * * * * * * * * * * * "FINE FILE</TD><TD>"
> 001145*
> 001146* * * * * * * * * * * * * "</TD></TR>"
> 001147* * * * * * * * * * * END-DISPLAY
> 001148*
> 001150*
> 001151* * * * * * * * * END-IF
> 001153*
> 001154* * * * * * * * *END-READ
> 001155* * * * * * * * *END-PERFORM
> 001160* * * * * * * * *CLOSE WEBINPUT
> 001170
> 001180 * * * * * * * * * * DISPLAY
> 001190 * * * * * * * * * * * * '<TR><TD ALIGN="RIGHT">'
> 001200 * * * * * * * * * * * * "DATI LETTI:</TD><TD>"
> 001210 * * * * * * * * * * * * DATI
> 001220 * * * * * * * * * * * * "</TD></TR>"
> 001230 * * * * * * * * * * END-DISPLAY
> 001240 * * * * *END-IF
> 001250 * * *END-PERFORM.
> 001260 * * *DISPLAY "</TABLE></P></BODY></HTML>"
> 001270 * * *END-DISPLAY.
> 001280 * * *GOBACK.


Reply With Quote
  #5 (permalink)  
Old 05-26-2012, 05:45 AM
federico
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value


> In case you missed it the first time:
>
> """Looking at my version 4 Fujitsu COBOL 4.0 User Guide, Chapter 11
> has some notes on Accept/Display and how it relates to SYSIN/SYSOUT
> and CONSOLE.
>
> In particular it says that you can't use SYSIN/SYSOUT and CONSOLE in
> the same program."""



Thanks for your reply. I didn't miss your sentence. Just I upload the
test code since you asked for os..web and code. Just to give you all
informations you asked for.

Doesn't fujitsu allow to read a standard console ? This seems to be
really a bug... however whend and IF I solve I'll put here the
result...

thanks again
Federico


Reply With Quote
  #6 (permalink)  
Old 05-26-2012, 11:32 AM
Pete Dashwood
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

federico wrote:
>> In case you missed it the first time:
>>
>> """Looking at my version 4 Fujitsu COBOL 4.0 User Guide, Chapter 11
>> has some notes on Accept/Display and how it relates to SYSIN/SYSOUT
>> and CONSOLE.
>>
>> In particular it says that you can't use SYSIN/SYSOUT and CONSOLE in
>> the same program."""

>
>
> Thanks for your reply. I didn't miss your sentence. Just I upload the
> test code since you asked for os..web and code. Just to give you all
> informations you asked for.
>
> Doesn't fujitsu allow to read a standard console ? This seems to be
> really a bug... however whend and IF I solve I'll put here the
> result...
>
> thanks again
> Federico


Federico,

Fujitsu DOES allow you to ACCEPT from CONSOLE.

I think Richard's point was that you can't use CONSOLE and SYSIN/SYSOUT in
the same program. So, if you want to accept from console you must display to
console. If you wish to use SYSIN/SYSOUT you cannot use CONSOLE, and vice
versa.

However, I think there may be some confusion here between STDIN and STDOUT.
These are the streams where you might expect to deal with CGI, and using
them does not preclude you from accepting data via the CONSOLE, as far as I
know.

None of this is anything I would be likely to do so I claim no expertise in
this area.

I will be interested tosee your solution when you have found one.

Ciao,

Pete.
--
"I used to write COBOL...now I can do anything."


Reply With Quote
  #7 (permalink)  
Old 05-26-2012, 06:59 PM
Richard
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

On May 26, 5:45*pm, federico <federico.pri...@gmail.com> wrote:
> > In case you missed it the first time:

>
> > """Looking at my version 4 Fujitsu COBOL 4.0 User Guide, Chapter 11
> > has some notes on Accept/Display and how it relates to SYSIN/SYSOUT
> > and CONSOLE.

>
> > In particular it says that you can't use SYSIN/SYSOUT and CONSOLE in
> > the same program."""

>
> Thanks for your reply. I didn't miss your sentence. Just I upload the
> test code since you asked for os..web and code. Just to give you all
> informations you asked for.
>
> Doesn't *fujitsu allow to read a standard console ? This seems to be
> really a bug... however whend and IF I solve I'll put here the
> result...


Windows is not Unix. Getting input in Windows is reading from a
keyboard. Fujitsu's CONSOLE on Windows is not Unix's stdin.

Reply With Quote
  #8 (permalink)  
Old 05-27-2012, 04:23 PM
federico
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

I have seen using the fujitsu debugger that when the trouble Exception
Number : JMP0209I-U [PID:00000484 TID:00000EC4] CANNOT ACCEPT/DISPLAY
FROM SYSTEM CONSOLE. 'READ' 109. PGM=WEB ADR=0040156C , occurs the
DATA accepted contains however correctly ALL CGI variables...
&name=variable&..ect.ect.

So a solution could be inform the compiler to avoid to check any
mistakes...

As you told windows is not Unix and Opencobol that runs fine get the
input from keyboard. A friend of mine with a old version of microfocus
(maybe 4...or ) obtain correctly the data sent using POST
opening a file named "CON:" with the "cb_open_file" routines.

That unfortuntalely doesn't run with fujitsu. As you told the fujtisu
seems to be without a valid solution for this. This is a pity. Do you
know another way to get ALL variables all together without knowing
them names and so on ?. The standard fujtisu routines doesn't allow
that.



Federico


Reply With Quote
  #9 (permalink)  
Old 05-27-2012, 07:00 PM
Richard
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

On May 28, 4:23*am, federico <federico.pri...@gmail.com> wrote:
> I have seen using the fujitsu debugger that when the trouble Exception
> Number *: JMP0209I-U [PID:00000484 TID:00000EC4] CANNOT ACCEPT/DISPLAY
> FROM SYSTEM CONSOLE. 'READ' 109. PGM=WEB ADR=0040156C , occurs the
> DATA accepted contains however correctly ALL CGI variables...
> &name=variable&..ect.ect.


You seem to be saying that the program _does_ put all the expected CGI
data into DATI and then gives the error.

Have you limited the ACCEPT to that given in 'CONTENT_LENGTH' ?

ACCEPT DATAI(1:Content-Length)


> So a solution could be inform the compiler to avoid to check any
> mistakes...
>
> As you told windows is not Unix and Opencobol that runs fine get the
> input from keyboard. A friend of mine with a old version of microfocus
> (maybe 4...or ) obtain correctly the data sent using POST
> opening a file named "CON:" *with the "cb_open_file" routines.
>
> That unfortuntalely doesn't run with fujitsu. As you told the fujtisu
> seems to be without a valid solution for this.


Fujitsu COBOL provides a set of CGI routines explicitly as a 'solution
for this'.

> This is a pity. Do you
> know another way to get ALL variables all together without knowing
> them names and so on ?. The standard fujtisu routines doesn't allow
> that.


Fujitsu also can directly interface with C modules so you could use C
to do the input.

Reply With Quote
  #10 (permalink)  
Old 05-28-2012, 05:40 AM
federico
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

>
> You seem to be saying that the program _does_ put all the expected CGI
> data into DATI and then gives the error.
>
> Have you limited the ACCEPT to that given in 'CONTENT_LENGTH' ?
>
> * *ACCEPT DATAI(1:Content-Length)


Yes I did also this test. No changes. Since as we told we cannot
manage the console it issues that mistake...

>
> Fujitsu COBOL provides a set of CGI routines explicitly as a 'solution
> for this'.


I started this discussion telling that I already use cgi routines from
Fujtisu, they run well. But what I was looking for is a little
different since it could give the opportunity to separate completely
the web from the cobol... however this is another topic. Since I used
opencobol for testing (I wrote the opensource projects: tp-
coboldebugger and a guicobol for it...) but I wanted going in deep
with this features since opencobol doesn't support oop :-( like
fujitsu.

>
> Fujitsu also can directly interface with C modules so you could use C
> to do the input.


Yes this seems to be a valid alternative method to working around.

thanks for your help
Federico

Reply With Quote
  #11 (permalink)  
Old 05-28-2012, 05:52 AM
Richard
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

On May 28, 5:40*pm, federico <federico.pri...@gmail.com> wrote:
> > You seem to be saying that the program _does_ put all the expected CGI
> > data into DATI and then gives the error.

>
> > Have you limited the ACCEPT to that given in 'CONTENT_LENGTH' ?

>
> > * *ACCEPT DATAI(1:Content-Length)

>
> Yes I did also this test. No changes. Since as we told we cannot
> manage the console it issues that mistake...


I also indicated to NOT use 'FROM CONSOLE' use the ACCEPT exactly as
above.




> > Fujitsu COBOL provides a set of CGI routines explicitly as a 'solution
> > for this'.

>
> I started this discussion telling that I already use cgi routines from
> Fujtisu, they run well. But what I was looking for is a little
> different since it could give the opportunity to separate completely
> the web from the cobol... however this is another topic. Since I used
> opencobol for testing (I wrote the opensource projects: tp-
> coboldebugger and a guicobol for it...) but I wanted going in deep
> with this features since opencobol doesn't support *oop :-( like
> fujitsu.
>
>
>
> > Fujitsu also can directly interface with C modules so you could use C
> > to do the input.

>
> Yes this seems to be a valid alternative method to working around.
>
> thanks for your help
> Federico


Reply With Quote
  #12 (permalink)  
Old 05-28-2012, 05:46 PM
federico
Guest
 
Posts: n/a
Default Re: fujitsu 5.0 standard POST getting value

On 28 Mag, 07:52, Richard <rip...@Azonic.co.nz> wrote:
> On May 28, 5:40*pm, federico <federico.pri...@gmail.com> wrote:
>
> > > You seem to be saying that the program _does_ put all the expected CGI
> > > data into DATI and then gives the error.

>
> > > Have you limited the ACCEPT to that given in 'CONTENT_LENGTH' ?

>
> > > * *ACCEPT DATAI(1:Content-Length)

>
> > Yes I did also this test. No changes. Since as we told we cannot
> > manage the console it issues that mistake...

>
> I also indicated to NOT use 'FROM CONSOLE' use the ACCEPT exactly as
> above.


Yes I tried also the accept as you told EXACTLY accept
data(1:numbytes) .... without console
and sysin (both)

NOT running fine.



Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 12:29 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.