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

compare a SET variable with a variable present in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Fri Nov 20, 2009 12:26 am
Reply with quote

I have a job given below:
Code:

//... JOB JOBCARD
//SET VAR1=1
//STEP1 EXEC PGM=MYPGM,PARM='&VAR1'


My requirement is as following:

I need to compare the value of the variable VAR1 with a data present in a file through REXX program. Say I have a file INDD and the fifth character of the file should be compared with the variable VAR1. If both are equal then continue with the STEP1 else it should display some message and exit out of the job without processing step1.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Nov 20, 2009 12:39 am
Reply with quote

how is this post related to the one I replied to earlier...
did I just waste time on it ??

You asked <something> and You got a clear/understandable reply... what else??

until You clarify better Your requirement You will get very little help...

the only thing that can be evinced from Your jcl is that the ...
program MYPGM will receive as a parameter the content of the VAR1 <symbol>

did You get a physician' s prescription to do something in rexx

what if some records contain the inFamous 5th char and others don' t ??

plese please do not ask to waste time with obscure questions
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Fri Nov 20, 2009 12:59 am
Reply with quote

sry for wasting your time...
my actuall requirement is:
We compile our cobol programs by giving "TSO CMPL" option and after giving this option a new screen comes.
In that screen we need to give some sort of inputs like program name,language type,mode(online,batch),DB2 option etc..
So, if some body gives wrong input like inplace of online program he gives batch then the program gets compiled wasting lot of our time.
I have prepared a list of programs and their modes in a ps file and i need to compare the program mode present in the file with the program
mode set in the SET variable.After that the rest is mentioned in my above post....
please assist me...
Thanks,
Abhijit.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Nov 20, 2009 1:03 am
Reply with quote

any reason to ask for the <program mode> and check afterwards
skip asking the user and use the info provided in the file
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Fri Nov 20, 2009 1:09 am
Reply with quote

no.....my requirement is not like that.....i have to compare with the file..one question...is it possible to use the SET variable in REXX program?.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Nov 20, 2009 1:30 am
Reply with quote

who is the <a derogatory adjective> who designed the process ?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Nov 20, 2009 1:45 am
Reply with quote

abhijit.nayak01 wrote:
is it possible to use the SET variable in REXX program?.


Of course. It would be passed as a PARM to your REXX exec:
Code:

//STEP0    EXEC PGM=IKJEFT01 or PGM=IRXJCL,PARM='EXECNAME &VAR1'
//SYSPROC or SYSEXEC DD DISP=SHR,DSN=...
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DUMMY
Back to top
View user's profile Send private message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Sat Nov 21, 2009 1:07 am
Reply with quote

Thanks for your input.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top