3

//STE1 IF RC EQ 1 THEN

....

//ENDIF

the return code is giving me FLUSH and all the other job is not executing becaue of this can anyone help me on this. is it because i havent given ELSE?

user3248637
  • 63
  • 1
  • 8
  • Many older operating systems have used the term Job Control Language (JCL). Which specific operating system are you referring to? Also what is giving the return code and what is a FLUSH? I think you need to add a lot more information to this question. – AdrianHHH Jan 29 '14 at 12:16
  • 1
    i am talking about mainframe JCL and the STE1 is returing FLUSH – user3248637 Jan 29 '14 at 12:23

2 Answers2

1

If you have conditions for running steps, either COND or IF, and the condition determines that a step is not run, then there is no "Return Code" from the step. The step is not run, it is FLUSHed, so there is no RC.

If the rest of the steps in your JOB are expecting to run on a RC=0, then you will have to change something.

Consult the JCL Reference, you have other options, like EVEN, ONLY, but these may not suit (haven't a clue, as don't know exactly what you are trying).

//STEPA 
...
//STEPB
...
//STEPC

If STEPB depends on STEPA, so will not run with a zero RC from STEPA, you need to decide what is needed for STEPC. You have three situations: STEPB not run; runs with zero RC; runs with non-zero RC. What should STEPC do in each case.

If STEPC has no conditional processing, then it will just run whatever happens to STEPB (except an abend, and no EVEN).

If STEPC needs to run conditionally, you have to decide what it is about STEPA and STEPB which tells you how to run it.

If your JOB is big, and the conditions are complex, consider splitting it into separate JOBs and letting the Scheduler take care of it.

If your JCL is destined for Production, there should be JCL Standards to follow, and if you are unclear how to do something, you should consult those responsible for the Production JCL, they will tell you how they want it, and whether you even need be concerned about it (as they may well just re-write from scratch anyway).

Bill Woodger
  • 12,968
  • 4
  • 38
  • 47
  • This is JCL MSG SAS FIND- STEP WAS EXECUTED - COND CODE 0000 SAS SAMPLE- STEP WAS NOT RUN BECAUSE OF CONDITIONAL EXPRESSSION ON STATEMENT 551 Line 551in JCL //STEPRC1 IF RC EQ 1 THEN // SAMPLE EXEC BFSAS ... //ENDIF – user3248637 Jan 29 '14 at 13:01
  • thanks bill i will check and procedd furthur from the information if u gave..thanks a lot – user3248637 Jan 29 '14 at 14:27
  • OK. Good luck. If you "hover" on your comments, you can delete them. Makes things tidier. Comments are "second class citizens" and can be removed once they have served their purpose. – Bill Woodger Jan 29 '14 at 14:32
-1

When a particular step in a JOB is skipped due to COND parameter or any other reason, what will be the retuen code that will displayed in the spool

Husna
  • 1