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
 

 

Calling B92 from REXX

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

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Sat Dec 01, 2012 1:45 pm    Post subject: Calling B92 from REXX
Reply with quote

Hi - I have been playing with this for an hour and just going round in circles.
We have a utility program that pulls some stats from B92.
At the moment it's in a clumsy JCL proc with a mass of wraparound but the actual invocation is...
Code:
//REPORTS  EXEC PGM=BSS01RFF,                                   
//            PARM=('S=92,B01LST=00,B92LST=00','PGM=B92BFJBR') 

I am trying to wrap it all together by imbedding this call inside a REXX wrapper.
Normally one would call a program as:
Code:
pgm = BSS01RFF
prm = [color=red]???[/color]
ADDRESS TSO "CALL *("STRIP(pgm")" prm,"T") 

but assigning the prm value is causing me grief. Any suggestions?!
My last attempt gave me...
Code:
     8 *-* pgm = 'BSS01RFF'                                             
       >L>   "BSS01RFF"                                                 
     9 *-* p1 = "'S=92,B01LST=00,B92LST=00'"                             
       >L>   "'S=92,B01LST=00,B92LST=00'"                               
    10 *-* p2 = "'PGM=B92BFJBR'"                                         
       >L>   "'PGM=B92BFJBR'"                                           
    11 *-* parms = p1","p2                                               
       >V>   "'S=92,B01LST=00,B92LST=00'"                               
       >L>   ","                                                         
       >O>   "'S=92,B01LST=00,B92LST=00',"                               
       >V>   "'PGM=B92BFJBR'"                                           
       >O>   "'S=92,B01LST=00,B92LST=00','PGM=B92BFJBR'"                 
    12 *-* ADDRESS TSO "CALL *(BSS01RFF)" p1","p2                       
       >L>   "CALL *(BSS01RFF)"                                         
       >V>   "'S=92,B01LST=00,B92LST=00'"                               
       >O>   "CALL *(BSS01RFF) 'S=92,B01LST=00,B92LST=00'"               
       >L>   ","                                                         
       >O>   "CALL *(BSS01RFF) 'S=92,B01LST=00,B92LST=00',"             
       >V>   "'PGM=B92BFJBR'"                                           
       >O>   "CALL *(BSS01RFF) 'S=92,B01LST=00,B92LST=00','PGM=B92BFJBR'"
INVALID KEYWORD, 'PGM=B92BFJBR'                                         
       +++ RC(12) +++     

/S
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Dec 01, 2012 2:12 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

Noo way from the TSO point of view, the parm MUST be a single string

but...
Quote:
PARM=('S=92,B01LST=00,B92LST=00','PGM=B92BFJBR')


why the ','
shouldn' t a simple comma be enough

if the called program does a keyword parsing of the parm string the extra apost' s are pretty useless
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Sat Dec 01, 2012 10:04 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

Thanks Enrico.
I RTFMd, well, several years ago , I have done this a few times for programs -that's how I know the syntax, I just never saw anything like this, as you say, it's normally a single string but B92 is a weird beast!
As I said, I had been working on this for an hour or more and that's the first thing I tried. Why the comma? I am just trying to emulate the JCL.
/S
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Dec 01, 2012 11:00 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

Steve,
You can get rid, as I said, of the extra apost' s

I just tested with a simple program to print the parms passed
and the result is exactly the same,
the reason must be researched in the oddities of PARM data parsing

the jcl
Code:
 000006 //S1 EXEC PGM=ZPARMS,
 000007 // PARM=('S=92,B01LST=00,B92LST=00','PGM=B92BFJBR')
 000008 //ZPARMS DD SYSOUT=*
 000009 //S2 EXEC PGM=ZPARMS,
 000010 // PARM=('S=92,B01LST=00,B92LST=00,PGM=B92BFJBR')
 000011 //ZPARMS DD SYSOUT=*


the result

Code:
19.27.02 JOB00107  +PARMLEN 00000025
19.27.02 JOB00107  +ZPARMS   ==>S=92,B01LST=00,B92LST=00,PGM=B92BFJBR
19.27.02 JOB00107  HTRT01I                                         CPU (Total)
19.27.02 JOB00107  HTRT02I Jobname  Stepname ProcStep    RC    I/O hh:mm:ss.th
19.27.02 JOB00107  HTRT03I ENRICO@1 S1                   00     24       00.02
19.27.02 JOB00107  +PARMLEN 00000025
19.27.02 JOB00107  +ZPARMS   ==>S=92,B01LST=00,B92LST=00,PGM=B92BFJBR
19.27.02 JOB00107  HTRT03I ENRICO@1 S2                   00     24       00.02
19.27.02 JOB00107  IEF404I ENRICO@1 - ENDED - TIME=19.27.02


the parmlen 25 is not an error... I was lazy and simply displayed the binary
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Sat Dec 01, 2012 11:36 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

It's something different. I rephrase the assignments...
Code:
/*REXX*--------------------------------------------------------------*>
//REPORTU  EXEC PGM=BSS01RFF,REGION=0M,                               
//            PARM=('S=92,B01LST=00,B92LST=00','PGM=B92BFJBR')         
>*-------------------------------------------------------------------*/
TRACE "I"                                                             
ADDRESS TSO "CALL *(BSS01RFF)",                                       
            "'S=92,B01LST=00,B92LST=00,PGM=B92BFJBR'"                 
SAY "ENDED RC="RC

and it fails RC=8...
Code:
 SDSF OUTPUT DISPLAY K248610B JOB55344  DSID   103 LINE 0       COLUMNS 02- 81 
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
********************************* TOP OF DATA **********************************
     6 *-* ADDRESS TSO "CALL *(BSS01RFF)",                                     
GM=B92BFJBR'"                                                                   
       >L>   "CALL *(BSS01RFF)"                                                 
       >L>   "'S=92,B01LST=00,B92LST=00,PGM=B92BFJBR'"                         
       >O>   "CALL *(BSS01RFF) 'S=92,B01LST=00,B92LST=00,PGM=B92BFJBR'"         
       +++ RC(8) +++                                                           
     8 *-* SAY "ENDED RC="RC                                                   
       >L>   "ENDED RC="                                                       
       >V>   "8"                                                               
       >O>   "ENDED RC=8"                                                       
ENDED RC=8                                                                     
READY                                                                           
END                                                                             
******************************** BOTTOM OF DATA ********************************

when I look at the job log I see this message...
Code:
+SFF9100E PROGRAM BSS01SFF DOES NOT COME FROM AN AUTHORIZED LIBRARY


so I have somehow de-authorized it by CALLing it!
"Hmmm, a way around this we must find" (as Yoda might say!).

/S
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Dec 01, 2012 11:51 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

You have a few options ...

1) add the program name to the AUTHPGM and AUTHTSF sections of IKJTSOxx used

2) make sure that all the libraries in the STEPLIB concatenation are authorized

3) put the library containig the B92 stuff into the LINKLIST

most probably 1 and 3 are the most reasonable.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Sat Dec 01, 2012 11:52 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

Getting better RC icon_rolleyes.gif ....added a TSOEXEC ...
Code:

 SDSF OUTPUT DISPLAY K248610B JOB55452  DSID   103 LINE 0       COLUMNS 02- 81
 COMMAND INPUT ===>                                            SCROLL ===> CSR
********************************* TOP OF DATA *********************************
     6 *-* ADDRESS TSO TSOEXEC "CALL *(BSS01RFF)",                             
GM=B92BFJBR'"                                                                 
       >L>   "TSOEXEC"                                                         
       >L>   "CALL *(BSS01RFF)"                                               
       >O>   "TSOEXEC CALL *(BSS01RFF)"                                       
       >L>   "'S=92,B01LST=00,B92LST=00,PGM=B92BFJBR'"                         
       >O>   "TSOEXEC CALL *(BSS01RFF) 'S=92,B01LST=00,B92LST=00,PGM=B92BFJBR'"
       +++ RC(4) +++                                                           
     8 *-* SAY "ENDED RC="RC                                                   
       >L>   "ENDED RC="                                                       
       >V>   "4"                                                               
       >O>   "ENDED RC=4"                                                     
ENDED RC=4                                                                     
READY                                                                         
END                                                                           
******************************** BOTTOM OF DATA *******************************

However it still gives an ...
Code:
+SFF9100E PROGRAM BSS01SFF DOES NOT COME FROM AN AUTHORIZED LIBRARY   

Same problem.
/S icon_confused.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Dec 01, 2012 11:56 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

TSOEXEC ( IIRC ) does not relieve the authorized libraries concatenation constraint .

if it runs correctly in pure batch that the library is already authorized

what are the libraries in Your steplib concatenation ?

can You get rid of all/some of them ( at least the non authorized ) ?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Dec 03, 2012 10:05 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

Code:
TSOEXEC CALL *(BSS01RFF)


Using '*' means to use the standard search order to find the member. And, as Enrico mentioned, you lose your authorization when you concatenate APF with non-APF datasets.

In this case, you should explicitly specify the name of the APF dataset:
Code:
TSOEXEC CALL 'my.apf.dataset(BSS01RFF)'
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 85
Location: Stockholm, Sweden

PostPosted: Mon Dec 03, 2012 11:41 pm    Post subject: Reply to: Calling B92 from REXX
Reply with quote

Thanks Pedro,
I had already tried that combination...
Code:
IEF375I  JOB/K248610B/START 2012338.1908                                       
IEF033I  JOB/K248610B/STOP  2012338.1908                                       
        CPU:     0 HR  00 MIN  00.02 SEC    SRB:     0 HR  00 MIN  00.00 SEC   
     6 *-* ADDRESS TSO                                                         
     7 *-* TSOEXEC CALL "'SYS2.BSA420.LINKLIB(BSS01RFF)'",                     
PGM=B92BFJBR'"                                                                 
       >L>   "TSOEXEC"                                                         
       >L>   "CALL"                                                             
       >O>   "TSOEXEC CALL"                                                     
       >L>   "'SYS2.BSA420.LINKLIB(BSS01RFF)'"                                 
       >O>   "TSOEXEC CALL 'SYS2.BSA420.LINKLIB(BSS01RFF)'"                     
       >L>   "'S=92,B01LST=00,B92LST=00,PGM=B92BFJBR'"                         
       >O>   "TSOEXEC CALL 'SYS2.BSA420.LINKLIB(BSS01RFF)' 'S=92,B01LST=00,B92LS
       +++ RC(4) +++                                                           
     9 *-* SAY "ENDED RC="RC                                                   
       >L>   "ENDED RC="                                                       
       >V>   "4"                                                               
       >O>   "ENDED RC=4"                                                       
ENDED RC=4                                                                     
    10 *-* EXIT (RC<>0)*8                                                       
       >V>   "4"                                                               
       >L>   "0"                                                               
       >O>   "1"                                                               
       >L>   "8"                                                               
       >O>   "8"                                                               
READY                                                                           
END

Nothing seems to get around it!? Still get an
Code:
+SFF9100E PROGRAM BSS01SFF DOES NOT COME FROM AN AUTHORIZED LIBRARY
/S icon_cry.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Dec 04, 2012 12:01 am    Post subject: Reply to: Calling B92 from REXX
Reply with quote

Code:
BSS01SFF DOES NOT COME FROM AN AUTHORIZED LIBRARY


then You will have to do a bit of researching


1) the steplib concatenation of the <batch> run

2) whether the library is in the lnklist concatenation

3) whether the installation requires the library be authorized and
somebody forgot about it ...
enter TSO ISRDDN and on the first screen enter APF

it will show the list of authorized datasets

but ... IIRC even a <direct call> will fail if the dataset is the steplib concatenation with unauth ones
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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