Page 2 of 2

Re: Can we submit a JCL and get the return code in COBOL?

PostPosted: Tue May 07, 2013 3:56 pm
by Kevin Q M Cai
Thank you all,

I programmed in windows before, and what the things I do now in MF, some of them are repeation and inflexible, and so, I think that there are some methods can do these thing automatically, and what I do, just configure the data the program need.

Thanks
Kevin

Re: Can we submit a JCL and get the return code in COBOL?

PostPosted: Tue May 07, 2013 4:47 pm
by Robert Sample
I think you need to understand that different platforms are ... different. A Windows machine was designed, from the start, to be used by a single person. Hence you can do things like examine each keystroke as entered and do things based upon the keyboard key hit. A mainframe was designed, from the start, to be used by hundreds -- or thousands -- of people simultaneously. Hence the 3270 emulator (like the 3270 terminal upon which the emulator is based) does not send a single character to the mainframe until you have signalled (via an attention key such as enter, clear, a PF or PA key) that you have finished with the screen you are on. The mainframe architecture does not allow you to examine each keystroke since they are buffered and not individually available.

Mainframes use address spaces. An address space is set up for each TSO user, batch job, and started task in the system. Each address space runs independently of all other address spaces in the system (and there may be several hundred address spaces at any given time on a given system), and there is limited communication between address spaces. This is designed so your COBOL program abend won't affect the production CICS region (and vice versa) -- unlike Windows where a single program crash may well force a reboot of the system. What this design does mean, however, is that some things that are easy on a Windows / Unix machine are not possible on a z/OS machine. If you are new to z/OS architecture, this is a very valuable (and often difficult) lesson to learn.

Re: Can we submit a JCL and get the return code in COBOL?

PostPosted: Tue May 07, 2013 4:53 pm
by Akatsukami
Kevin Q M Cai wrote:I programmed in windows before, and what the things I do now in MF, some of them are repeation and inflexible, and so, I think that there are some methods can do these thing automatically, and what I do, just configure the data the program need.

What you do not realize is that z/OS and various quasi-system level packages are a mature technology that provide all those services. You do not need to program them yourself (leading, as I have too often seen, to the horror of no one knowing how things actually work because everyone coded them his own damn way and didn't bother documenting it); you just have to use them.

Mr. Sample has told you that the inter-job communication facilities that you seek to implement are already present in your job scheduler. Why do you not use them, instead of pretending that you need to develop yourself?

Re: Can we submit a JCL and get the return code in COBOL?

PostPosted: Tue May 07, 2013 4:53 pm
by enrico-sorichetti