devhawala / emx370

S/370 emulator allowing to run the CMS operating system of VM/370-R6 from 1978
13 stars 2 forks source link

emx370 #2

Open tchandler48 opened 4 years ago

tchandler48 commented 4 years ago

Found this project and it is GREAT. I have having issues trying to load a text file to the rdr. I have tried every combination, but I am sure I am missing something.

Any assistance would be most helpful.

Cheers Tom c

devhawala commented 4 years ago

Hello Tom,

well, never tried to load a TEXT file with the reader. I think the external file must be (EBCDIC)binary with exactly the card layout of a text file, meaning all "cards" must be 80 bytes long without line break characters (no LF, no CR), having the binary context of the text file. In a nutshell: the {Windows,Unix) equivalent to RECFM F and LRECL 80.

Enqueuing such a file must be done as EBCDIC, which is the equivalent to "binary".

Maybe best would be to write out a text file with the card punch to see if the same file can be read back to CMS to an identical file?

Good luck, Hans

tchandler48 commented 4 years ago

Thank you. Will give it a try and report back. What is strange is that the RDR ENQ has an option for ASCII, although.

GREAT software, just got to figure it out on how to use. I would like to add COBOL FORTRAN and KICKS to it if possible.

Cheers Tom c

On Fri, Aug 21, 2020 at 9:31 AM devhawala notifications@github.com wrote:

Hello Tom,

well, never tried to load a TEXT file with the reader. I think the external file must be (EBCDIC)binary with exactly the card layout of a text file, meaning all "cards" must be 80 bytes long without line break characters (no LF, no CR), having the binary context of the text file. In a nutshell: the {Windows,Unix) equivalent to RECFM F and LRECL 80.

Enqueuing such a file must be done as EBCDIC, which is the equivalent to "binary".

Maybe best would be to write out a text file with the card punch to see if the same file can be read back to CMS to an identical file?

Good luck, Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-678321358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBLYDECQF43MBFHN7HLSB2AM7ANCNFSM4QGKZWYQ .

tchandler48 commented 4 years ago

Tried pun the hello c file out. It did punch out,but in ascii and appears to have dropped all the spaces on each line. Tried to read in back using the RDR ENQ command with various options, but no luck. Just not sure.

Thank you Tom c. PS: I use your nicof on vm370 and it works great.......

devhawala commented 4 years ago

Hello Tom,

there is a missing part in the readme documentation about punching files: like for the printer, the spool class used when punching a file decides over some things. While i have written down things for printing, i forgot for punching...

But is is simple: a letter spool class (A to Z) for PUN writes out an ascii file to the output directory of the punch device, a digit (0 to 9) writes out as ebcdic (aka binary).

I tested the following with CMSUSER in the sample-system:

cp spool class pun 0

punch hello c

close pun

(copied the generated file pun_1598043417030_1_HELLOTST_C.data one directory up as hello_c.data)

#cp

:rdr enqueue ebcdic cp_cmsuser/hello_c.data

begin

readcard hellotst.c

The above worked well to read the punched file back with two exceptions: the file hellotst c is RECFM F LRECL 80 and has an additional first line :READ HELLO C ..., i.e. a control card inserted by the punch command if i remember well (i believe that there must be an option to suppress the control card on punching or reading).

Writing out the file as ascii also worked:

spool pun class a

punch hello c

close pun

This produced the file pun_1598043686345_2_HELLO_C.txt in the puncher directory puncher_output for cmsuser.

There may be some little problems with line lengths when beyond 80 columns, i don't remember how a real VM/370 behaves (truncate?, linewrap?) and what/how i did implement it in emx370, it's a long time ago that i programmed it... I will have to extend the doc some day.

I hope the above helps, good luck.

Regards, Hans

devhawala commented 4 years ago

Hello Tom,

i forgot in the last post: reading back the file written as ascii also worked (again after copying the file written to a simpler name) with:

#cp

':rdr enqueue ascii cp_cmsuser/hello_c.txt`

begin

read hello3 c

(again with the same 2 differences: LRECL 80 RECFM F and the additional first line)

Hans

devhawala commented 4 years ago

Hello Tom,

regarding your intention to add things to emx370: fortran and cobol should simply be a matter of transferring the corresponding minidisks from a VM/370 system (under Hercules) to emx370. I suppose these compilers and runtimes will run even if the CMS compilers were OS compilers in the first place.

For Kicks, i don't know if if will be easy, as Kicks requires the OS emulation and an OS minidisk. Both may need to extract additional shared segments from a VM/370 system. Never tried...

Hans

tchandler48 commented 4 years ago

Sir, Thank you for all your help. I am looking for the source code of your cmsftpd and can not find it. I want to see how you implemented the tcp code, for another project that I am working on.

Any advise on where I may find this source code.

Thank your for your help and hard work on nicof project.

Cheers Tom c

On Sat, Aug 22, 2020 at 9:49 AM devhawala notifications@github.com wrote:

Hello Tom,

regarding your intention to add things to emx370: fortran and cobol should simply be a matter of transferring the corresponding minidisks from a VM/370 system (under Hercules) to emx370. I suppose these compilers and runtimes will run even if the CMS compilers were OS compilers in the first place.

For Kicks, i don't know if if will be easy, as Kicks requires the OS emulation and an OS minidisk. Both may need to extract additional shared segments from a VM/370 system. Never tried...

Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-678650092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBJL5GR2GWLZEMLOKNTSB7LJNANCNFSM4QGKZWYQ .

devhawala commented 4 years ago

Hello Tom,

(Hans is OK)

The CMSFTPD-code is in the NICOF repository, which is a sibling-repo to emx370. You can find the source of CMSFTPD at:

https://github.com/devhawala/nicof/blob/master/cms/cmsftpd.c

BTW: i had the idea to bring the socket-code of NICOF one day by emulating the VMCF functionality used by NICOF, but this is still pending...

Greetings, Hans

tchandler48 commented 4 years ago

Hans, Thank you for the response on the code question. I think it would be great to pull the socket code in emulating the vmcf, but I know that takes time and effort. But it is very exciting to learn and study new ideas.

BTW, I almost made it to my PhD in computer sci. I was working for AT&T Bell labs and of course they were paying for it. When I took early retirement that stopped paying of it and of course I wonder what it would be worth to me to continue. That was one of my BIG mistakes not to continue with it, but live and learn.

Again, Thank you for your time and help.

Cheers Tom c

On Wed, Sep 9, 2020 at 10:17 AM devhawala notifications@github.com wrote:

Hello Tom,

(Hans is OK)

The CMSFTPD-code is in the NICOF repository, which is a sibling-repo to emx370. You can find the source of CMSFTPD at:

https://github.com/devhawala/nicof/blob/master/cms/cmsftpd.c

BTW: i had the idea to bring the socket-code of NICOF one day by emulating the VMCF functionality used by NICOF, but this is still pending...

Greetings, Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-689631008, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBJUG2NZS3XAWHLHYKLSE6L7XANCNFSM4QGKZWYQ .

tchandler48 commented 4 years ago

Hans, trying to fine cmssys.h. can not seem to find it in your github anywhere.

Any ideas.

Cheers Tom c ps:. working on a simple web server running under nicof (I hope)

On Wed, Sep 9, 2020 at 10:25 AM Tom Chandler tchandler48@gmail.com wrote:

Hans, Thank you for the response on the code question. I think it would be great to pull the socket code in emulating the vmcf, but I know that takes time and effort. But it is very exciting to learn and study new ideas.

BTW, I almost made it to my PhD in computer sci. I was working for AT&T Bell labs and of course they were paying for it. When I took early retirement that stopped paying of it and of course I wonder what it would be worth to me to continue. That was one of my BIG mistakes not to continue with it, but live and learn.

Again, Thank you for your time and help.

Cheers Tom c

On Wed, Sep 9, 2020 at 10:17 AM devhawala notifications@github.com wrote:

Hello Tom,

(Hans is OK)

The CMSFTPD-code is in the NICOF repository, which is a sibling-repo to emx370. You can find the source of CMSFTPD at:

https://github.com/devhawala/nicof/blob/master/cms/cmsftpd.c

BTW: i had the idea to bring the socket-code of NICOF one day by emulating the VMCF functionality used by NICOF, but this is still pending...

Greetings, Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-689631008, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBJUG2NZS3XAWHLHYKLSE6L7XANCNFSM4QGKZWYQ .

devhawala commented 4 years ago

Tom, this file is part of the GCC compiler for CMS, it defines the interface to the "C native CMS runtime" library for GCC.

It should be on one of the library system disks for GCC (201 or 202).

Greetings, Hans

tchandler48 commented 4 years ago

Hans, Thank you for the information. Sorry I did not do a better job of research.

I am trying to compile the tserver.c program. It is asking for vmcbloks and I have yet to find it. Any suggestions on where I may look.

Thank you Tom c

On Fri, Sep 11, 2020 at 12:05 AM devhawala notifications@github.com wrote:

Tom, this file is part of the GCC compiler for CMS, it defines the interface to the "C native CMS runtime" library for GCC.

It should be on one of the library system disks for GCC (201 or 202).

Greetings, Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-690875590, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBLWELYQ32Q6JGKTPHLSFGVYBANCNFSM4QGKZWYQ .

devhawala commented 4 years ago

Hello Tom,

sounds like some system item for VMCF used in an assembler module. So a MACLIB may be missing...?

You should check if all MACLIBs used when assembling are present on some accessed minidisk (there is a 'assemble' EXEC used for the NICOF assembler files). Maybe i used some esoteric library for CP not available to normal users, so possibly only the user MAINT sees it by default...

Good luck Hans

tchandler48 commented 4 years ago

Sir, Have been programming using nicof socket support. revc works great and translate from ascii to ebcdic works also. The trouble I am having is on the send side. If I dont translate the string and send it out i get ebcdic characters on my browser page. If I translate the string, I get zero bytes transmitted.

Is there some trick or something on the send side. I have looked at your various programs and have followed them. But I can not get the system to send out a translated string.

Any suggestions would be MOST appreciated.

Cheers Tom c

On Sat, Sep 12, 2020 at 3:09 AM devhawala notifications@github.com wrote:

Hello Tom,

sounds like some system item for VMCF used in an assembler module. So a MACLIB may be missing...?

You should check if all MACLIBs used when assembling are present on some accessed minidisk (there is a 'assemble' EXEC used for the NICOF assembler files). Maybe i used some esoteric library for CP not available to normal users, so possibly only the user MAINT sees it by default...

Good luck Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-691441328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBIDSM2Q334G67OBRFLSFMUCXANCNFSM4QGKZWYQ .

tchandler48 commented 4 years ago

I think I have found it. If I have a string that contains HTTP/1.1 200 OK\n, the translate ebcdic2ascii fails on the / but if I remove the / so it reads HTTP 1.1 200 OK\n is translate correctly. However my application will not work because the response is required including the /.

So is it a translation table or code issue??

Thank You Tom c

On Tue, Sep 22, 2020 at 12:56 PM Tom Chandler tchandler48@gmail.com wrote:

Sir, Have been programming using nicof socket support. revc works great and translate from ascii to ebcdic works also. The trouble I am having is on the send side. If I dont translate the string and send it out i get ebcdic characters on my browser page. If I translate the string, I get zero bytes transmitted.

Is there some trick or something on the send side. I have looked at your various programs and have followed them. But I can not get the system to send out a translated string.

Any suggestions would be MOST appreciated.

Cheers Tom c

On Sat, Sep 12, 2020 at 3:09 AM devhawala notifications@github.com wrote:

Hello Tom,

sounds like some system item for VMCF used in an assembler module. So a MACLIB may be missing...?

You should check if all MACLIBs used when assembling are present on some accessed minidisk (there is a 'assemble' EXEC used for the NICOF assembler files). Maybe i used some esoteric library for CP not available to normal users, so possibly only the user MAINT sees it by default...

Good luck Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-691441328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBIDSM2Q334G67OBRFLSFMUCXANCNFSM4QGKZWYQ .

devhawala commented 4 years ago

Hello,

you probably mean the function nicofclt_ebcdic2ascii() (aka ncf_090()). This proc is used for all EBCDIC to ASCII translations, also in CMSFTPD. It uses a translation table that i just checked: code 0x2F (ASCII-slash) is at position 0x61 (EBCDIC-slash) in the table e2a_tab, so all should be well.

To recheck this, i looked in CMSFTPD for a message that contains a slash and is translated through the mentioned procedure, i found it in the response to the PWD command. So i tested CMSFTPD unter VM/370 using FTP from a DOS-prompt, and apparently it works, slashes are returned from CMSFTPD (the translation happens in procedure sendCtrlMsg()): image

So i really wonder what is going wrong in your use-case... ... can you post the fragment of your code where the translation happens?

Greetings, Hans

tchandler48 commented 4 years ago

sir, lets call it my by programming. I have a working work around and now the http server that I was writing is up and running. You now can do simple web pages from a web server that is running under vm370 cms nicof. A lot more testing and adding of features, but simple web pages are working.....

Thank you for all your help. If I get the web server to a beta test point, if your are interested I will be glad to send you a zipped up file with it.

Cheers Tom c

On Wed, Sep 23, 2020 at 12:30 PM devhawala notifications@github.com wrote:

Hello,

you probably mean the function nicofclt_ebcdic2ascii() (aka ncf_090()). This proc is used for all EBCDIC to ASCII translations, also in CMSFTPD. It uses a translation table that i just checked: code 0x2F (ASCII-slash) is at position 0x61 (EBCDIC-slash) in the table e2a_tab, so all should be well.

To recheck this, i looked in CMSFTPD for a message that contains a slash and is translated through the mentioned procedure, i found it in the response to the PWD command. So i tested CMSFTPD unter VM/370 using FTP from a DOS-prompt, and apparently it works, slashes are returned from CMSFTPD (the translation happens in procedure sendCtrlMsg()): [image: image] https://user-images.githubusercontent.com/34173994/94047485-73718380-fdd2-11ea-87f9-924d2e8b9b2e.png

So i really wonder what is going wrong in your use-case... ... can you post the fragment of your code where the translation happens?

Greetings, Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-697749123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBPK5ZGNTBDIMALXAY3SHIWBRANCNFSM4QGKZWYQ .

tchandler48 commented 4 years ago

Sir, Just an update on your nicof package. I have been able to develop a web server, chat server, and am working on smtp client and server all using the nicof package. In addition, I am adding the socket code to CMSBASIC. This is a basic interpreter that runs under CMS, a lot more modern than basic in vm370 I do need to learn how to use the gcclib so I can access to the cms commands.

NICOF appears to work quite well. I do get a bind error now and then, but have not tracked it down, so I don't know how and why it is not working.

Just want to let you know that nicof is working well and I have been able to develop some more modern code for vm370.

Thank you for all your hard work.

Cheers Tom c

On Wed, Sep 23, 2020 at 4:58 PM Tom Chandler tchandler48@gmail.com wrote:

sir, lets call it my by programming. I have a working work around and now the http server that I was writing is up and running. You now can do simple web pages from a web server that is running under vm370 cms nicof. A lot more testing and adding of features, but simple web pages are working.....

Thank you for all your help. If I get the web server to a beta test point, if your are interested I will be glad to send you a zipped up file with it.

Cheers Tom c

On Wed, Sep 23, 2020 at 12:30 PM devhawala notifications@github.com wrote:

Hello,

you probably mean the function nicofclt_ebcdic2ascii() (aka ncf_090()). This proc is used for all EBCDIC to ASCII translations, also in CMSFTPD. It uses a translation table that i just checked: code 0x2F (ASCII-slash) is at position 0x61 (EBCDIC-slash) in the table e2a_tab, so all should be well.

To recheck this, i looked in CMSFTPD for a message that contains a slash and is translated through the mentioned procedure, i found it in the response to the PWD command. So i tested CMSFTPD unter VM/370 using FTP from a DOS-prompt, and apparently it works, slashes are returned from CMSFTPD (the translation happens in procedure sendCtrlMsg()): [image: image] https://user-images.githubusercontent.com/34173994/94047485-73718380-fdd2-11ea-87f9-924d2e8b9b2e.png

So i really wonder what is going wrong in your use-case... ... can you post the fragment of your code where the translation happens?

Greetings, Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devhawala/emx370/issues/2#issuecomment-697749123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQYLBPK5ZGNTBDIMALXAY3SHIWBRANCNFSM4QGKZWYQ .

devhawala commented 4 years ago

Hi Tom,

interesting news, congratulations.

As you are building your tools on top of an unmodified Nicof, you could publish your add-ons and advertise them on the h390-vm at groups.io. Your programs may be useful for other users of VM/370...

Thanks for the information and greetings Hans