Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: why condition codes are in even only like 4,8,12,16 ???any s
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue Oct 27, 2009 7:14 pm    Post subject: Reply to: why condition codes are in even only like 4,8,12,1
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Tue Oct 27, 2009 7:26 pm    Post subject:
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

Site Director


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

PostPosted: Tue Oct 27, 2009 8:30 pm    Post subject:
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: 1458
Location: Azeroth

PostPosted: Tue Oct 27, 2009 10:52 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Oct 27, 2009 11:25 pm    Post subject: Reply to: why condition codes are in even only like 4,8,12,1
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    Post subject:
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: 401
Location: Mumbai

PostPosted: Wed Oct 28, 2009 3:31 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sun Nov 01, 2009 3:08 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am
No new posts File matching using specific condition mf_karthik DFSORT/ICETOOL 3 Fri Nov 20, 2015 11:04 pm
No new posts INCLUDE condition for 'Contains' krsenthil85 DFSORT/ICETOOL 4 Mon Oct 26, 2015 11:03 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us