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



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

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

Postby Kevin Q M Cai » Tue May 07, 2013 3:56 pm

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
Kevin Q M Cai
 
Posts: 17
Joined: Fri Mar 15, 2013 3:39 pm
Has thanked: 11 times
Been thanked: 0 time

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

 

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

Postby Robert Sample » Tue May 07, 2013 4:47 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

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

Postby Akatsukami » Tue May 07, 2013 4:53 pm

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?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby enrico-sorichetti » Tue May 07, 2013 4:53 pm

cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post