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
 

 

compare a SET variable with a variable present in REXX

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

Active User


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

PostPosted: Fri Nov 20, 2009 12:26 am    Post subject: compare a SET variable with a variable present in REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Nov 20, 2009 12:39 am    Post subject: Reply to: compare a SET variable with a variable present in
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: 157
Location: South Africa

PostPosted: Fri Nov 20, 2009 12:59 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Nov 20, 2009 1:03 am    Post subject: Reply to: compare a SET variable with a variable present in
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: 157
Location: South Africa

PostPosted: Fri Nov 20, 2009 1:09 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Nov 20, 2009 1:30 am    Post subject: Reply to: compare a SET variable with a variable present in
Reply with quote

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

Moderator Team Head


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

PostPosted: Fri Nov 20, 2009 1:45 am    Post subject:
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: 157
Location: South Africa

PostPosted: Sat Nov 21, 2009 1:07 am    Post subject: Reply to: compare a SET variable with a variable present in
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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