Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
I have never tried this before and need some help...

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

Active User


Joined: 13 Jun 2012
Posts: 168
Location: United States

PostPosted: Sat Apr 13, 2019 12:52 am    Post subject: I have never tried this before and need some help...
Reply with quote

I am working on setting up an ISPF dialog to automatically move wsdl and bind unix files from stage directories to production. I coded a short exec using test file paths just to see if it would work:

File name is: MKEC.IMSD.SYSEXEC(UNIXCOPY):

Code:
ALLOC DD(IFILE) PATH('/u/cjpdp/wsdl/NewUser.wsdl)'                   
ALLOC DD(OFILE) PATH('/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl,
             PATHOPTS=(ORDWR,OCREAT,OTRUNC),                         
             PATHMODE=(SIRWXU,SIRWXG,SIRWXO)                         
OCOPY INDD(IFILE) OUTDD(OFILE) 


I then issued the ISPF shell command EXEC 'MKEC.IMSD.SYSEXEC(UNIXCOPY)'

I got this message:
Code:
IKJ56228I PATH /U/CJPDP/WSDL/NEWUSER.WSDL) NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED   

It does work using JCL and executing OCOPY under IKJEFT01, but I really would like to run it from an ISPF panel.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2255
Location: Hampshire, UK

PostPosted: Sat Apr 13, 2019 2:18 am    Post subject: Reply to: I have never tried this before and need some help...
Reply with quote

Your single quotes appear to be wrongly placed. Have you tried executing with trace enabled?
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 168
Location: United States

PostPosted: Sat Apr 13, 2019 2:33 am    Post subject:
Reply with quote

Thanks. I fixed the quotes. Same message. I will try trace.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sat Apr 13, 2019 3:23 am    Post subject: Reply to: I have never tried this before and need some help...
Reply with quote

I do not see any rexx syntax in your program.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sat Apr 13, 2019 3:35 am    Post subject: Reply to: I have never tried this before and need some help...
Reply with quote

I think your command are being upper-cased.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 328
Location: Denmark

PostPosted: Sat Apr 13, 2019 12:28 pm    Post subject:
Reply with quote

end paranthesis are missing in your ALLOC statements.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 773
Location: The Universe

PostPosted: Sat Apr 13, 2019 11:36 pm    Post subject: Re: I have never tried this before and need some help...
Reply with quote

John Poulakos wrote:
I am working on setting up an ISPF dialog to automatically move wsdl and bind unix files from stage directories to production. I coded a short exec using test file paths just to see if it would work:

File name is: MKEC.IMSD.SYSEXEC(UNIXCOPY):

Code:
ALLOC DD(IFILE) PATH('/u/cjpdp/wsdl/NewUser.wsdl)'                   
ALLOC DD(OFILE) PATH('/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl,
             PATHOPTS=(ORDWR,OCREAT,OTRUNC),                         
             PATHMODE=(SIRWXU,SIRWXG,SIRWXO)                         
OCOPY INDD(IFILE) OUTDD(OFILE) 


I then issued the ISPF shell command EXEC 'MKEC.IMSD.SYSEXEC(UNIXCOPY)'

I got this message:
Code:
IKJ56228I PATH /U/CJPDP/WSDL/NEWUSER.WSDL) NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED   

It does work using JCL and executing OCOPY under IKJEFT01, but I really would like to run it from an ISPF panel.

I think both Pedro and Mr. Jensen have valid comments.

Now I'm not going to comment on the first ALLOCATE command, though it appears to have been upper cased. This implies there is no /* REXX */ line, which makes the data set a CLIST rather than a Rexx exec.

Nor am I going to mark up the second ALLOCATE statement with code tags.

ALLOC DD(OFILE) PATH('/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl,
PATHOPTS=(ORDWR,OCREAT,OTRUNC),
PATHMODE=(SIRWXU,SIRWXG,SIRWXO)

Now the OP claims to have corrected the quotes. Presumably it is now

ALLOC DD(OFILE) PATH('/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl',
PATHOPTS=(ORDWR,OCREAT,OTRUNC),
PATHMODE=(SIRWXU,SIRWXG,SIRWXO)

The PATH keyword, according to TSO HELP for the ALLOCATE command, just has one operand; PATHOPTS and PATHMODE are not secondary keywords in PATH. So I think what is really wanted is

ALLOC DD(OFILE) PATH('/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl'),
PATHOPTS=(ORDWR,OCREAT,OTRUNC),
PATHMODE=(SIRWXU,SIRWXG,SIRWXO)

This accounts for Mr. Jensen's comments about a missing parenthesis. TSO is not all that hyper about a missing trailing parenthesis. TSO generally treats the comma characters in the command as white space and I'm not sure what it thinks about the = characters; so I think what is really needed is

ALLOC DD(OFILE) PATH('/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl')
PATHOPTS(ORDWR OCREAT OTRUNC)
PATHMODE(SIRWXU SIRWXG SIRWXO)
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 168
Location: United States

PostPosted: Tue Apr 16, 2019 7:18 pm    Post subject:
Reply with quote

Here is the exact same function in JCL:

Code:
//COPY1    EXEC PGM=IKJEFT01                                       
//INHFS  DD PATH='/u/cjpdp/wsdl/NewUser.wsdl'                     
//OUTHFS DD PATH='/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl',
//          PATHOPTS=(ORDWR,OCREAT,OTRUNC),                       
//          PATHMODE=(SIRWXU,SIRWXG,SIRWXO)                       
//SYSTSPRT DD SYSOUT=*                                             
//SYSTSIN  DD *                                                   
OCOPY INDD(INHFS) OUTDD(OUTHFS)                                   
/*                                                                 


There really isn't much in the JES log:

Code:
IEF142I CJPDPZ COPY1 - STEP WAS EXECUTED - COND CODE 0000           
IGD104I HFS FILE WAS RETAINED, DDNAME IS (INHFS   )                 
FILENAME IS (/u/cjpdp/wsdl/NewUser.wsdl)                           
IGD104I HFS FILE WAS RETAINED, DDNAME IS (OUTHFS  )                 
FILENAME IS (/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl)   

So after converting this to run as an EXEC as follows:

Code:
ALLOC DD(IFILE) PATH('/u/cjpdp/wsdl/NewUser.wsdl')                     
ALLOC DD(OFILE) PATH('/usr/lpp/cicsts/cicsts42/TEST/wsdl/NewUser.wsdl')
PATHOPTS=(ORDWR,OCREAT,OTRUNC)                                         
PATHMODE=(SIRWXU,SIRWXG,SIRWXO)                                         
OCOPY INDD(IFILE) OUTDD(OFILE)                                         


And issuing the EXEC command, I get:

Code:
 IKJ56228I PATH /U/CJPDP/WSDL/NEWUSER.WSDL NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED


As has been observed, the file name is being converted to upper case in the error message... I don't know how to prevent this. Maybe it isn't meaningful.

Coded for you - please do it yourself
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 328
Location: Denmark

PostPosted: Tue Apr 16, 2019 7:53 pm    Post subject:
Reply with quote

I am pretty sure that you are not executing it as a REXX but rather as a clist.
If I do this it works like a charm:
Code:
/* rexx */                                   
 "FREE  DD(IFILE OFILE)"                     
 "ALLOC DD(IFILE) PATH('/u/wj/stdin.file')"   
 "ALLOC DD(OFILE) PATH('/u/wj/stdout.file')",
       "PATHOPTS(ORDWR,OCREAT,OTRUNC)",       
       "PATHMODE(SIRWXU,SIRWXG,SIRWXO)"       
 "OCOPY INDD(IFILE) OUTDD(OFILE)" 

But as a clist I get the error that you describe:
Code:
 FREE   DD(IFILE OFILE)                     
 ALLOC DD(IFILE) PATH('/u/wj/stdin.file')   
 ALLOC DD(OFILE) PATH('/u/wj/stdout.file') +
       PATHOPTS(ORDWR,OCREAT,OTRUNC) +     
       PATHMODE(SIRWXU,SIRWXG,SIRWXO)       
 OCOPY INDD(IFILE) OUTDD(OFILE)             

And by the way, your continuations are wrong, as are your PATHOPTS and PATHMODE operands - they do not take equal sign signs.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 328
Location: Denmark

PostPosted: Tue Apr 16, 2019 8:21 pm    Post subject:
Reply with quote

And before you ask, those quotes around the commands are necessary. I tried without and the commands failed as REXX tried to execute function DD, which the RACF DELDSD command.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 168
Location: United States

PostPosted: Tue Apr 16, 2019 9:27 pm    Post subject:
Reply with quote

Thanks, Willy...

I am very rusty at this. I have not played with REXX or clist in 15 years.

By the way, how do you get the display in black and green?
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 328
Location: Denmark

PostPosted: Tue Apr 16, 2019 9:46 pm    Post subject:
Reply with quote

By using the 'code' button below the 'Subject' line. Mark the code section and press the button.
Back to top
View user's profile Send private message
hankoerlemans

New User


Joined: 25 Jan 2018
Posts: 20
Location: Australia

PostPosted: Tue Nov 19, 2019 9:24 am    Post subject: Reply to: I have never tried this before and need some help...
Reply with quote

I tend to always put /* Rexx */ on the first line so I don't have to think about whether it's being found in the SYSPROC or the SYSEXEC concatenation.

Mind you the first snippet fails even "better" when it's just in SYSEXEC icon_biggrin.gif icon_biggrin.gif
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:


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