IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

why condition codes are in even only like 4,8,12,16 ???any s


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Tue Oct 27, 2009 7:08 pm
Reply with quote

why condition codes are in even only like 4,8,12,16 ???any specific reason
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 27, 2009 7:14 pm
Reply with quote

not a requirement...
just a habit
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Tue Oct 27, 2009 7:23 pm
Reply with quote

not clear ......
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 27, 2009 7:26 pm
Reply with quote

IBM uses 4, 8, 12,etc to designate specific levels of problem with their compilers and utilities. What IBM does, many people copy. Since a code can be anything from 0 to 4095, there is no requirement to use even numbers (much less numbers divisible by 4). However, since IBM tends to be standard, a lot of people picked up the habit of using 4, 8, 12, etc and continue it through today.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 27, 2009 8:30 pm
Reply with quote

Hello,

Some systems i've worked on have a standard that locally developed code must use condition codes of 1000 and greater so the only times a cc of 4, 8, etc will occur is from an IBM (or other vendor) utility.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Oct 27, 2009 10:52 pm
Reply with quote

Hi,

4:8-12 PASSAGE from Bible says, icon_pray.gif

Quote:
There was no end to his toil,
yet his eyes were not content with his wealth.
"For whom am I toiling," he asked,
"and why am I depriving myself of enjoyment?"
This too is meaningless—
a miserable business!

Its so synonymous to what a Software professional is,
Maybe thats why IBM chose 4,8 & 12.

BTW, really nice observation to ask this question.


P.S. - No harm intended. icon_lol.gif

Regards,
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Oct 27, 2009 11:25 pm
Reply with quote

I think this was decided a long time ago, before I started on z/OS.

But I have seen some colleagues coding some kind of branch table. That is, 4, 8, 12, 16, etc... fall on fullword boundaries and could be used to pick something out of a previously setup table; for example, the address of an appropriate message.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Oct 28, 2009 1:10 am
Reply with quote

Many times it was the offset of the next instruction. The return code from a subroutine was added to the return address to find the next instruction, so it needed to be on a fullword boundary.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Wed Oct 28, 2009 3:31 am
Reply with quote

Wow. I didn't realize that so many people would know this bit of trivia originated with branch tables, let alone how to code one. Bravo. Have an extra beer (or Metamucil) on me icon_smile.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Oct 31, 2009 5:42 am
Reply with quote

As I recall, reg 15 contained the RC and was used to increment a Branch instr to a branch table [B BRTBL(R15)] that, in turn, contained 4 byte branch instrs to processing routines, e.g. B RC00RTN, B RC04RTN, B RC08RTN, etc.

Don't recall the Assembler coding format at all anymore - it's been a while.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Nov 01, 2009 3:08 am
Reply with quote

Hello,

Something like:

Code:
       B  *+4(R15)    BRANCH DEPENDING ON RETURN CODE
       B  ITSZERO     00 - OK, CONTINUE
       B  ITS04       04 - DO THE 4 STUFF
       B  ITS08       08 - DO THE 8 STUFF
       B  ITS12       12 - DO THE 12 STUFF


Yup, it has been a while icon_cool.gif
Nope, didn't assemble it. . .

Of course if R15 has some other value, it could get "entertaining". . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts AI writing DFSORT, REXX codes.. All Other Mainframe Topics 3
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts selectively copy based on condition DFSORT/ICETOOL 3
No new posts RXSUBCOM Return Codes / Documentation CLIST & REXX 6
Search our Forums:

Back to Top