Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Is there a Hello World COBOL example for DOS/VS?
Hi folks.
Of all the languages around in this Mainframe work, Cobol is the only one I played with a little in the past with OpenCobolIDE (although I find Fortran not that hostile :-) ... But here I'm struggling because at the stacked principles that have to be all right in order for a JOB to work. Does someone know about some fundamental/basic examples of DOS/VS COBOL JOBs to start to play with? I've not found even the classic Hello World sample to check whether fcobol wakes up. Thank you very much in advance. Cheers. |
That is for dos360 , but the examples should work in doses Which dosvs are you?using? On Fri, 16 Jun 2023, 12:37 Alejandro olivan Alvarez, <alejandro.olivan.alvarez@...> wrote: Hi folks. |
Hi guys.
Thank you for your help! I appreciate this very much. By one side, I have yet another fork on investigation path, since I have missed that DOS/360 site (probably all my research and googiln has always been '370' focused/filtered) ... I feel that's gonna be fun, since a kick look at it makes me thing this site covers a whole OS sysgen, which sounds lika is a ton of fun! On the other side, now with 3 'known to work' Jobs, I feel more confident approaching DOS/VS (forgot to mention, I run DOS/VS as a VM370-CE guest). I have a starting point :-) Cheers!?? |
Interesting... some good news/bad news situation here:
The bad news is that Hello Worl in cobol does not work. The good news (to me) is that it wasn't that different from the one I came up and tried before posting here. Now, the exact issue is that DOS/VS says this at the console: BG // JOB HELLO ? ? ? DATE 06/18/23,CLOCK 09/53/27 BG C102I? ? ? ?UNSUPPORTED DEVICE TYPE-SYS004 BG 0S02I JOB HELLO? ? CANCELED DUE TO PROGRAM REQUEST BG EOJ HELLO? ?? ? ? ? DATE 06/18/23,CLOCK 09/53/27,DURATION 00/00/00 F1 1Q34I? ? ? BG WAITING FOR WORK It is very shocking to me that it doesn't work, since, well, it is a DOS/VS as it comes in VM370/CE, and overall and otherwise it behaves as expected... I read a little on those 'problem program' 'labels' SYS00x but, to be honest, it all sounds to me as fascinating as cryptic. No need to mention that the other two programs suffer the same doom, as are laconically cancelled for the very same unsupported TYPE-SYS004 device... quite pesky this DOS/VS guy... Cheers!? |
Post your JCL. Joe On Sat, Jun 17, 2023 at 10:13?AM Alejandro olivan Alvarez <alejandro.olivan.alvarez@...> wrote: Interesting... some good news/bad news situation here: |
Hello Alejandro,
?
There is nothing wrong with the JCL, the problem comes from the compiler. I forgot about it when I posted my demo programs. The COBOL F compiler of DOS/VS is actually the one of DOS/360 and it expects the working files to be stored on a 2314 disk, while they are on a 3350 on DOS/VS. Moreover, the compiler uses SYS004 for a work file while it is logically assigned to the card reader by the XXINITBG job (after POWER is started), hence the C102I message you get.
?
For the programs to compile/run, you need to modify XXINITBG and patch the COBOL compiler so it will accept work files on a 3350. Here's what you can do:
?
1. Delete the current XXINIT jobs from the reader queue:
?
? ?PDELETE RDR,*XX
?
2. Submit the attached job 1-XXINIT.jcl to replace them.
?
3. Release the new XXINIT jobs:
?
? ?PRELEASE RDR,*XX
?
4. Submit the attached job 2-COBZAP.jcl to patch the compiler.
?
After that, you should be able to compile FCOBOL programs in BG.
?
Cheers,
?
Rene FERLAND, Montreal
?
P.S. -- The COBZAP job was written by Bill Carlborg, not me. |
Wow... This gets even more interesting! ... So, those XXInit jobs are worth taking a look at and dig a little...I feel I may learn some fundamentals there I Guess It would be therefore reasonsable, upon success on the patching, to keep a copy of the resulting, patched, dos/vs 3350s and replace the ones shipped with vm/ce Thanks! El sáb., 17 jun. 2023 19:05, René Ferland <ferland.rene@...> escribió:
|
It works now!!! :-D
Thank you all very very much! It also turned out that I got quite a bit of old jobs queued there... quite a mess. So I needed to read a litle on those queue management commands ... pdisplay and pdelete, but also psetup and pgo since (don't know why) one of my past hellocob attempts triggered an 'IQ40A' message and was stuck on the lst queue.... overall, I managed to clean all up, and jobs started to run an print nicely...? a ton of fun!!! Cheers. |
Alejandro olivan Alvarez wrote:
[...] So I needed to read a litle on those queue managementJust be very careful not to confuse "D" (which is the abbreviation for the PDISPLAY command) with "L" (which is the abbreviation for the PDELETE command)! I still remember an incident from years and years ago at the shop I used to work at, where an inexperienced newbie mistakenly thought "d" meant "delete" and "l" mean "list", and ended up deleting the entire list queue when she entered the command "l lst,*"!! (Oops!!) :) So keep in mind: "L" = DELETE "D" = "DISPLAY" -- "Fish" (David B. Trout) Software Development Laboratories mail: fish@... |
>> I guess It would be therefore reasonable, upon success on the patching, to keep a copy of the resulting, patched, dos/vs 3350s and replace the ones shipped with vm/ce.
I thought about something like that for a while, but I feel it is better to leave the 5-pack as is. People can customized it to their needs whenever necessary. Besides, not that many people use DOS/VS for COBOL programming, so it is often more "fruitful" to help people via this group like I did with you.
?
If I am right, George Shedlock built his 5-pack based on the DOS/VS system he worked on, in his professional career. I assume he was an assembler programmer and did not pay that much attention to the old DOS/360 COBOL and PL/I compilers requirements. Since I didn't (and still don't) know how to patch a compiler, I came up with a first degree solution at the time: add a 2314 disk and change the BG labels of the work files. That is what I explain in a video on the Youtube channel of Moshix. I believe the SORT program on DOS/VS also needs a 2314 for its work files, so the added disk could be used for that too.
?
Anyway, I am glad you have fun with POWER and FCOBOL now. Enjoy DOS/VS, it has more to offer than one might think at first. :-)
?
Cheers,
?
Rene FERLAND, Montreal
? |
to navigate to use esc to dismiss