Return code 4000



High Level Assembler(HLASM) for MVS & VM & VSE

Return code 4000

Postby Tim » Mon Mar 28, 2011 11:31 pm

I'm trying to write a short program that will set a completion code of 4000 (0xFA0). Will this do it? (Plagiarized from http://en.wikipedia.org/wiki/IEFBR14). Thanks!

JRC4000 START
        USING JRC4000,15
        B     GO
        DC    AL1(L'ID)
ID      DC    C'JRC4000'
        DS    0H
GO      L     R15,=x'FA0'
        BR    14
        END   JRC4000
Tim
 
Posts: 21
Joined: Thu Mar 24, 2011 1:00 am
Has thanked: 0 time
Been thanked: 0 time

Re: Return code 4000

Postby NicC » Mon Mar 28, 2011 11:33 pm

one way to find out real quick
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Return code 4000

Postby Tim » Mon Mar 28, 2011 11:36 pm

Not for me there isn't.
Tim
 
Posts: 21
Joined: Thu Mar 24, 2011 1:00 am
Has thanked: 0 time
Been thanked: 0 time

Re: Return code 4000

Postby NicC » Mon Mar 28, 2011 11:41 pm

Ah - forgot you are not an MVS person/programmer. I am not the worlds greatest assembler programmer so I would have to assemble/link/execute to see if it really works. However, some bright spark will be along before I could do all that.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Return code 4000

Postby BillyBoyo » Tue Mar 29, 2011 12:14 am

In glorbrik this would be something like the word "return" and the value you want to return.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Return code 4000

Postby Tim » Tue Mar 29, 2011 12:27 am

Touche! :)

Although, I should point out I simply plagiarized it from wikipedia.
Tim
 
Posts: 21
Joined: Thu Mar 24, 2011 1:00 am
Has thanked: 0 time
Been thanked: 0 time

Re: Return code 4000

Postby Tim » Tue Mar 29, 2011 12:31 am

In fact, my question is really much simpler. Will this line of code place 4000 into register 15?

GO L R15,=x'FA0'

And, just out of curiosity, is this equivalent?

GO L R15,=4000
Tim
 
Posts: 21
Joined: Thu Mar 24, 2011 1:00 am
Has thanked: 0 time
Been thanked: 0 time

Re: Return code 4000

Postby steve-myers » Tue Mar 29, 2011 12:39 am

If you're not sure of something, try it! Here's my take, though it has not been tested.
RC4000   RSECT
         LA    15,4000
         BR    14
         END   RC4000

Other people made good suggestions, my example is the requirement reduced to the absolute minimum. I used RSECT rather than CSECT for two reasons.
  • RSECT implies that the CSECT is read only, and the Assembler applies the same tests as specifying RENT.
  • The read only attribute is carried into the load module. No verification is done, but it's there.
The read only attribute is used when linking the z/OS nucleus. The nucleus loader (which is part of the IPL procedure) uses it, but I no longer recall how it's used. Not that any of us are going to relink the nucleus. It's been 30 years, probably longer, since I've done it.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Return code 4000

Postby BillyBoyo » Tue Mar 29, 2011 12:55 am

In the 5th post of the original thread you saw an example of setting the return code/condition code/reason code whatever we call it. Can't say I've ever seen 4000 come out of IDCAMS, but worth a try to check, could save you writing, assembling, linking, plus all your testing/release procedures.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Return code 4000

Postby Tim » Tue Mar 29, 2011 1:15 am

I never did understand what was going on with IDCAMS. I looked it up and found it is used to generate and modify datasets, but figured maybe this was some trivial use of the program. Then there was the part about "obviously this can't be done as instream, but hopefully you get the gist", and as I'm sure you now realize, I didn't come close to getting the gist. But it seemed like the end result was to return a completion code of 0, which as I now understand things, wouldn't have helped since the job completion code was still going to be the highest value from any step in the job.

My "program" is really just the IEFBR14 utility with one instruction changed to store 4000 instead of 0 in register 15, and I don't even know if I got that right.
Tim
 
Posts: 21
Joined: Thu Mar 24, 2011 1:00 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post