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
 

 

TSO Call to Iebcopy - Does not end

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

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Thu Mar 11, 2010 5:09 pm    Post subject: TSO Call to Iebcopy - Does not end
Reply with quote

Guys,

I am using the following code snippet.

/
Code:
*****REXX************************************************************/
PARSE UPPER ARG INPUT_DSN OUTPUT_DSN
/*********************************************************************/
/* VALIDATE INPUT PARAMETERS                                         */
/*********************************************************************/
IF INPUT_DSN = '' THEN
DO
   SAY 'INPUT DATASET SHOULD NOT BE NULL'
   EXIT 0
END

IF SYSDSN(INPUT_DSN) \= 'OK' THEN
DO
   SAY 'INPUT DATASET NOT FOUND'
   EXIT 0
END

DO WHILE OUTPUT_DSN = ''
   SAY 'ENTER OUTPUT DATASET WITHOUT QUOTES'
   PULL OUTPUT_DSN
END

OUTPUT_DSN =  "'" || STRIP(OUTPUT_DSN) || "'"

IF SYSDSN(OUTPUT_DSN) = 'OK' THEN
DO
  ZEDSMSG = 'OUTPUT DATASET EXIST !!'
  "ISPEXEC SETMSG MSG(ISRZ001)"
  EXIT 1
END

"ALLOCATE  DA("OUTPUT_DSN") LIKE("INPUT_DSN")"

IF RC > 0 THEN
DO
  SAY 'CHECK NAME OF THE DATASET !!!!!!!!!!'
  EXIT 0
END

SAY 'COPYING IS IN PROGRESS ......'
"ALLOC DA("INPUT_DSN") F(SYSUT1) SHR REUSE"
"ALLOC DA("OUTPUT_DSN") F(SYSUT2) SHR REUSE"

FC = LISTDSI(INPUT_DSN)

IF SUBSTR(SYSDSORG,1,2) = 'PO' THEN
   DO
     "ALLOC F(SYSPRINT)  DUMMY"
     "CALL *(IEBCOPY) "
     "FREE F(SYSPRINT)"
   END

"FREE F(SYSUT1,SYSUT2)"

SAY 'DATASET ALLOCATED SUCCESSFULLY AND COPIED.......'
"FREE DS("OUTPUT_DSN")"
RETURN


I am using this as a line command against a particular dataset.

It allocates the output dataset perfectly. But when it tries to call IEBCOPY, it goes to an infinite loop and no response been received. I have used Attention key then to terminate the call.

Is any permissions required for my profile from installation team to use 'Call' in Rexx?

Thanks!
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: Thu Mar 11, 2010 6:08 pm    Post subject: Reply to: TSO Call to Iebcopy - Does not end
Reply with quote

I see nothing unusual in the code, and no, I seriously doubt that you would require special permissions to use the TSO CALL command.

Can you post a runtime TRACE?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Mar 11, 2010 6:10 pm    Post subject:
Reply with quote

Why using a dummy sysprint?
I miss the sysin allocation and statement, something like
C O=I1,I=I1
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: Thu Mar 11, 2010 7:15 pm    Post subject: Reply to: TSO Call to Iebcopy - Does not end
Reply with quote

Peter, you may be on to something.

On my system, for this code to work, I first had to change the SYSPRINT allocation to add the REUSE parameter (WHY, WHY, WHY don't you guys automatically put in REUSE when you allocate your DD's)? And, IEBCOPY did need me to allocate a SYSIN, although I just specified DD DUMMY, since by default IEBCOPY will copy all members from SYSUT1 to SYSUT2. Without the SYSIN allocation, IEBCOPY prompted for the input from the terminal.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 11, 2010 7:16 pm    Post subject:
Reply with quote

PeterHolland is awarded 3 points.

I had exactly the same problem some weeks back with IEBGENER, because no SYSIN was defined it just sat there waiting for terminal input.

If there is no SYSIN info then define it as DUMMY.
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: Thu Mar 11, 2010 7:17 pm    Post subject: Reply to: TSO Call to Iebcopy - Does not end
Reply with quote

Of course, those allocations MAY be resident in the calling JCL.
Back to top
View user's profile Send private message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Thu Mar 11, 2010 7:40 pm    Post subject: Reply to: TSO Call to Iebcopy - Does not end
Reply with quote

Thanks guys. I have changed that particular part of code to like below and it worked like sweet icon_biggrin.gif

Code:
IF SUBSTR(SYSDSORG,1,2) = 'PO' THEN                     
   DO                                                   
     "ALLOC F(SYSPRINT) DUMMY"                           
     "ALLOC F(SYSIN) UNIT(SYSDA) SPACE(1 1) TRACKS REUSE"
     SYSIN.0 = 1                                         
     SYSIN.1 = "  C I=SYSUT1,O=SYSUT2"                   
     "EXECIO * DISKW SYSIN (FINIS STEM SYSIN."           
     DROP SYSIN.                                         
     "CALL *(IEBCOPY)"                                   
     "FREE F(SYSPRINT)"                                 
     "FREE F(SYSIN)"                                     
   END                                                   


expat,
Quote:
If there is no SYSIN info then define it as DUMMY.

Defining Sysin as dummy was still giving the same issue.
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: Thu Mar 11, 2010 7:49 pm    Post subject: Reply to: TSO Call to Iebcopy - Does not end
Reply with quote

How did that cause a looping problem though? If IEBCOPY was prompting you for the SYSIN input from the terminal, weren't you responding to it?
Back to top
View user's profile Send private message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Thu Mar 11, 2010 7:55 pm    Post subject:
Reply with quote

It was prompting for input...i thought it went to infinite loop because when i pressed the attention key - it terminated at the CALL statement.

Will giving "C I=SYSUT1,O=SYSUT2" in the terminal solve the issue?

I will try it now...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 11, 2010 8:30 pm    Post subject:
Reply with quote

Wierd - mine works if I do or don't allocate SYSIN.
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 Mar 12, 2010 1:46 am    Post subject:
Reply with quote

satheeshkamal wrote:
Will giving "C I=SYSUT1,O=SYSUT2" in the terminal solve the issue?


Possibly, or just terminating the input stream (/*).
Back to top
View user's profile Send private message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Fri Mar 12, 2010 11:22 am    Post subject:
Reply with quote

This is what i did in sequence...
1. Executed the command with the original code (allocating sysprint as dummy and not allocating sysin).

I got the below message
Code:
COPYING IS IN PROGRESS ......
IKJ56246I FILE SYSPRINT NOT ALLOCATED, FILE IN USE


Then
2. Gave the below input
Code:
/*

and got the below messages
Code:
IEBCOPY MESSAGES AND CONTROL STATEMENTS                              PAGE     1                                       
 IEB1135I IEBCOPY  FMID HDZ1A10  SERVICE LEVEL UA46465  DATED 20090319 DFSMS 01.
10.00 z/OS    01.10.00 HBB7750  CPU 2096                                       
 IEB1035I HCLSKSU  IKJHSC1  IKJHSC1  23:46:30 THU 11 MAR 2010 PARM=''

3. And the terminal was still prompting for input and gave the same
Code:
/*

Then got the below message and other successful copy messages. The dataset is copied perfectly.

Code:
IKJHSC1  COPY      INDD=SYSUT1,OUTDD=SYSUT2         GENERATED STATEMENT
Back to top
View user's profile Send private message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Fri Mar 12, 2010 11:23 am    Post subject:
Reply with quote

When i executed the same command again...it prompted for input...i gave
'/* few times and no informational messages from IEBCOPY has been displayed and dataset was still copied perfectly.

Thanks
Back to top
View user's profile Send private message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Fri Mar 12, 2010 11:25 am    Post subject:
Reply with quote

expat, may be you can try log off the TSO session and try again. the terminal might prompt you for input.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 12, 2010 12:23 pm    Post subject:
Reply with quote

Here's what I used. And it works just fine if I comment out SYSIN or not.
Code:
/* REXX *** INVOKE IEBCOPY FROM TERMINAL                             */
                                                                       
SYSUID = STRIP(SYSVAR(SYSUID))                                         
                                                                       
"FREE  FI(SYSIN,SYSUT1,SYSUT2,SYSUT3,SYSPRINT)"                         
"DEL   '"SYSUID".IEBCOPY.TEMP.OUT'"                                     
"ALLOC FI(SYSIN) DUMMY RECFM(F B) LRECL(80)"                     
"ALLOC FI(SYSUT1) DA('"SYSUID".REXX') SHR"                             
"ALLOC FI(SYSUT2) DA('"SYSUID".IEBCOPY.TEMP.OUT') NEW TRACKS DIR(134)   
       SPACE(75 75) RECFM(F B) LRECL(80)"                               
"ALLOC FI(SYSUT3) TRACKS SPACE(750 750)"                               
"ALLOC FI(SYSPRINT) SYSOUT(A)"                                         
                                                                       
"CALL *(IEBCOPY)"                                                       
"FREE  FI(SYSIN,SYSUT1,SYSUT2,SYSUT3,SYSPRINT)"                         
                                                                       
EXIT         
Back to top
View user's profile Send private message
satheeshkamal

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Fri Mar 12, 2010 12:55 pm    Post subject:
Reply with quote

I have used code similar to this.
Code:
"ALLOC F(SYSPRINT) DUMMY"                           
     "ALLOC F(SYSIN) UNIT(SYSDA) SPACE(1 1) TRACKS REUSE"
     SYSIN.0 = 1                                         
     SYSIN.1 = "  C I=SYSUT1,O=SYSUT2"                   
     "EXECIO * DISKW SYSIN (FINIS STEM SYSIN."           
     DROP SYSIN.                                         
     "CALL *(IEBCOPY)"                                   
     "FREE F(SYSPRINT)"                                 
     "FREE F(SYSIN)"

When it is executed first time, it worked fine. After that, if you comment out the SYSIN statements and run this again, it will still work fine.

But, if you log off the TSO session and then login again, execute the code which has the SYSIN statements commented out, the terminal should prompt you for input.

I think once it is executed, for that TSO session, the SYSIN might have been allocated until that session ends...I may be wrong in this...just a guess.

Thanks
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Fri Mar 12, 2010 1:09 pm    Post subject:
Reply with quote

LOGOFF/LOGON won't change a thing because anyway there is a FREE SYSIN before the IEBCOPY.

expat, maybe you're executing PDSFAST or another IEBCOPY replacement?
Usually there are little differences in their behaviour.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 12, 2010 1:29 pm    Post subject:
Reply with quote

With all the message codes being IEBnnnnI I would assume IEBCOPY.
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 Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
No new posts PCOMM macro to call another PCOMM macro boyti ko All Other Mainframe Topics 4 Tue Jul 12, 2016 4:30 pm


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