Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10373
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: 10373
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: 10373
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: 4650
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 Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
This topic is locked: you cannot edit posts or make replies. Rexx to Grab ISMF Information. upendrasri All Other Mainframe Topics 16 Sun Nov 26, 2017 12:35 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us