IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is there anyway to bring //SYSIN DD * in a PROC


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Dec 08, 2008 11:02 am
Reply with quote

Hi all,

I have JCL PROC, inside the PROC, i have
Code:
//SYSIN    DD *           
  PUNCH TYPORG=PO         

&
Code:
//SYSIN    DD   *             
  OPTION COPY                 
  OUTREC FIELDS=(1:2,79)       


I am getting an error, saying that PROC can't contain SYSIN DD *
Code:
++SYSIN    DD *                                                       
(1 CARD IN INPUT STREAM DATA SET)                                     
CAY6058E PROCEDURE STATEMENT CANNOT CONTAIN DD * OR DD DATA PARAMETER


How to solve the problem...

Sushanth
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Dec 08, 2008 11:19 am
Reply with quote

Hi,

Create a PDS(E), copy the SYSIN cards to it's member & include those members in your PROC.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Dec 08, 2008 11:19 am
Reply with quote

Hi,

you have answered your own question, you cannot instream data in a PROC.

Either place instream data in a PDS and call it in your proc or override the PROC

Gerry
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Dec 08, 2008 12:06 pm
Reply with quote

Hi guyz,

I have placed the instream data as a PDSE member. Using JEM i check'd the JCL, there was no error, but when i submitted it. The return code was 16.

Error is
Code:
PRINT/PUNCH DATA SET UTILITY               
PUNCH TYPORG=PO                           
IEB435I MISSING COMMAND PRECEDING COL 13   
IEB420I SYSIN IS EMPTY                     


&

Code:
SYSIN :                                             
OPTION COPY                                         
       *                                           
OUTREC FIELDS=(1:2,79)                             
       *                                           
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT     
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT     
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE       


I replaced SYSIN input data stream with the following
Code:
//SYSIN    DD DSN=HXSULL.JCL(SYSIN1),DISP=SHR   

&
Code:
//SYSIN    DD DSN=HXSULL.JCL(SYSIN2),DISP=SHR


SYSIN1 contains
Code:
PUNCH TYPORG=PO 


SYSIN2 contains
Code:
OPTION COPY             
OUTREC FIELDS=(1:2,79) 


Did i miss something....

Sushanth
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 08, 2008 12:27 pm
Reply with quote

Hello,

Quote:
Did i miss something....
It looks like you began the statements in col 1 in the members - they should be the same as when they were inline, not col 1.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Dec 08, 2008 12:31 pm
Reply with quote

Thank You dick, It worked.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Dec 08, 2008 12:38 pm
Reply with quote

Oh well.. Great..and Thanks for keeping us posted with what have worked for you.. icon_smile.gif
Back to top
View user's profile Send private message
m_a_n_u

New User


Joined: 04 Apr 2023
Posts: 3
Location: france

PostPosted: Tue Apr 04, 2023 1:26 pm
Reply with quote

Since z/OS 2.1, you can use instream data in proc : www.ibm.com/docs/en/zos/2.1.0?topic=statements-embedding-in-stream-data-in-procedure
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Proc print in Mainframe All Other Mainframe Topics 4
No new posts COBOL reading from SYSIN COBOL Programming 1
No new posts trying to set return code in PROC JCL & VSAM 15
No new posts concatenate sysin to dsn JCL & VSAM 7
Search our Forums:

Back to Top