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

Batch Pipe error in JCL


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ilakkia
Warnings : 1

New User


Joined: 17 May 2008
Posts: 28
Location: chennai

PostPosted: Thu Aug 07, 2008 10:06 am
Reply with quote

We are using batch pipes in one of our jobs and now we are facing an issue. Please advice us on this issue. The document with details of the JCL's and the pipe error is added as an attachment.

Thanks,
S.Ilakkia
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 07, 2008 12:00 pm
Reply with quote

DO NOT POST ATTACHMENTS

As not everyone can see them. Thus limiting the number of people available to help you.

Don't be lazy - post properly.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Aug 07, 2008 12:29 pm
Reply with quote

expat wrote:
As not everyone can see them. Thus limiting the number of people available to help you.
And I'm one of those such victims..
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: Thu Aug 07, 2008 7:49 pm
Reply with quote

Hello,

As others have mentioned, you need to post your info using copy/paste and the "Code" tag at the top of the Reply panel. Attachemnts are not usable by many of our contributors and "screenshots" just make a mess and i delete them. Copy/Paste/"Code" is the way to go.

Once you hae entered your post, you can Preview your post to see how your post will appear to the forum. When you are satisfied with the way your post looks, then press Submit.
Back to top
View user's profile Send private message
ilakkia
Warnings : 1

New User


Joined: 17 May 2008
Posts: 28
Location: chennai

PostPosted: Thu Aug 07, 2008 8:26 pm
Reply with quote

Here is my Job and issue related to it.

The code with pipes is as below:
JCL 1:
Code:

//JOBNAME1 EXEC JOBNAME1
//*
//STEP1.SORTOUT DD DISP=(,CATLG,DELETE),
//    UNIT=SYSDA,
//    DCB=(RECFM=FB,LRECL=4000,BLKSIZE=0,BUFNO=30),
//    SPACE=(TRK,(40000,9000),RLSE),
//    SUBSYS=(BP01,'PIPEDEPTH=200'),
//    DSN= TEST.PIPE.SORT.OUTPUT
//*

JCL executes the procedure JOBNAME1.
Procedure JOBNAME1 is as below:
Code:

//JOBNAME1 PROC HOLD=*,
//      ARCL=*
//*
//STEP1    EXEC PGM=SORT,REGION=512M
//SYSIN    DD DISP=SHR,DSN=TEST.CODE.CNTLB(CNTL1)
//SYSOUT   DD SYSOUT=&HOLD
//SYSPRINT DD SYSOUT=&ARCL
//SORTWK01 DD UNIT=SYSDA,SPACE=('CYL,900’),DSNTYPE=LARGE
//SORTWK02 DD UNIT=SYSDA,SPACE=('CYL,900’),DSNTYPE=LARGE
//
.
.
//* Similarly, 20 SORT WORKSPACE are used.
//*
//SORTIN   DD DISP=SHR,
//            DSN=TEST.INPUT.FILE1
//            DD DISP=SHR,
//            DSN=TEST.INPUT.FILE2
//SORTOUT   DD DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            DCB=(RECFM=FB,LRECL=4000,BLKSIZE=24000,BUFNO=30),
//            SPACE=(TRK,(40000,9000),RLSE),
//            DSN=TEST.SORT.OUTPUT
//*

Note that the SORTOUT dataset is overridden in JCL1 with PIPE dataset.
***********************************************************************
JCL 2:
Code:

//JOBNAME2 EXEC JOBNAME2
//*
//STEP05R.INPUT1 DD DISP=SHR,
//    UNIT=SYSDA,
//    DCB=(RECFM=FB,LRECL=4000,BLKSIZE=0,BUFNO=30),
//    SPACE=(TRK,(40000,9000),RLSE),
//    SUBSYS=(BP01,'PIPEDEPTH=200'),
//    DSN=TEST.PIPE.SORT.OUTPUT
//*

JCL2 executes procedure JOBNAME2.
Procedure JOBNAME2 is as below:
Code:

//CXA100J2 PROC HOLD=*,
//         ARCL=*
//*
//STEP2 EXEC PGM=’COBOL program name’,REGION=4096K
//*
//STEPLIB DD DISP=SHR,DSN=’Dataset Library Name’
//SYSTSIN DD DISP=SHR,DSN=TEST.CODE.CNTLB(CNTL2)
//*
//SYSPRINT DD SYSOUT=&HOLD
//SYSOUT   DD SYSOUT=&ARCL
//*
//INPUT1   DD DISP=SHR,
//         DSN=TEST.SORT.OUTPUT
//*
//INPUT2   DD DISP=SHR,
//         DSN= TEST.INPUT.FILE3
//*
//OUTPUT   DD DISP=(NEW,CATLG,DELETE),
//         UNIT=SYSDA,
//         DCB=(RECFM=FB,LRECL=182,BLKSIZE=27846),
//         SPACE=(TRK,(9000,500),RLSE),
//         DSN=TEST.FINAL.OUTPUT
//*

Note that INPUT1 is overridden in JCL2 with the same PIPE dataset.
********************************************************************
Here JCL1 acts as writer.
JCL2 acts as reader.
Pipe dataset: TEST.PIPE.SORT.OUTPUT
JCL1 and JCL2 ran concurrently.
Here input files are sorted by JCL1 and as each record is written into pipe dataset ‘TEST.PIPE.SORT.OUTPUT’, JCL2 reads each record from the pipe dataset and uses it in executing the Cobol code.
When the Number of records in TEST.INPUT.FILE1 is 4377415 and Number of records in TEST.INPUT.FILE2 is 10660319, we are facing an issue with the above code.
The description of the issue is below.
INPUT1 - READER IS WAITING FOR OPEN SYNC
PIPE IN ERROR. REASON=PARTICIPANT JOB2 IN ERROR
INPUT1 - ERROR DISTRIBUTED FROM ANOTHER PARTICIPANT.
ACTION = ABEND
JOB FAILED BY JOB OPTIMIZER PIPES
Additional Information:
PIPE PARAMETERS FOR DD INPUT1:
PIPE-FLG - BATCH-PI
RD-EROPT - IMMED
ADD-WTR - 0
NOOP-WT - 5
I/O-ACT - ASKOPER
SYNC-ACT - ASKOPER
BLKSIZE - 32000
FIT-DD
RDR-FLAG - NO-EOFWT
SYNC-TYP - OPEN
REQ-PRTS - 0
REQ-RDR - 1
NOOP-ACT - ASKOPER
SYNC-WT - 30
BUFF# - 99
LRECL - 4000
ERROR-CC - 0
REQ-WTR - 1
ADD-RDR - 0
I/O-WT - 5
RECFM – 90
Please advise us on the above issue.

Thanks,
S.Ilakkia
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: Thu Aug 07, 2008 11:42 pm
Reply with quote

Hello,

Is this the first attempt to use batch pipes on this system?

Are both jobs submitted at the same time?

Your sort appears to be large rather than small. I mention this because the sort will need to process for a while before there is any output ready to be written as the actual sorted output. Also (once upon a time) different releases of various sort products might use the output dataset as work space while performing the sort. How would your process react to that? How would the pipes process know which writes to sortout were "real" (i.e. the final output) and which were the sort processing internally? This may not be a concern - i do not know how the various sort products run these days.

It would be interesting to see the jes messages from both jobs as well as the diagnostic info presented by them.

Job1 specifies (new,catlg) for the sortout and i'm not sure what the system will do when the second job tries to allocate the same dataset. This should also be in the jes outputs.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 08, 2008 12:21 pm
Reply with quote

Does sort write data to sortout before the data is completely sorted ?
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: Fri Aug 08, 2008 8:53 pm
Reply with quote

Hi Expat,

Once upon a time, some sorts did. The "last thing" the sort did was to write the completed sorted output to the "front" of the sortout dataset. I don't know if this is still done or not.

When an internal sort was used that specified "output procedure" there as no need to copy the sorted data to the front of some output file and that overhead was saved. All that was needed was to return the records in the correct sequence to the code and where on the dasd the sorted data came from was no concern to the program.
Back to top
View user's profile Send private message
ilakkia
Warnings : 1

New User


Joined: 17 May 2008
Posts: 28
Location: chennai

PostPosted: Wed Aug 13, 2008 8:22 pm
Reply with quote

Unable to reach neither SyncSort Mainframe Product Services nor atamargulies@syncsort.com.

Can someone help me to fix this issue.

Issue Description:

Jobs JCL1 and JCL2 are waiting in open for sync state.
I need to synchronize the transfer or records from JCL1 to JCL2 via pipes.

Please suggest any parameter to fix this issue.
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: Thu Aug 14, 2008 2:13 am
Reply with quote

Hello,

Quote:
Unable to reach neither SyncSort Mainframe Product Services nor atamargulies@syncsort.com.

They are rather easy to reach. . . Where did you get that e-address for Alissa?
Try these:
zos_tech@syncsort.com
201-930-8260

Quote:
Is this the first attempt to use batch pipes on this system?

It would be interesting to see the jes messages from both jobs as well as the diagnostic info presented by them.
You have not yet posted the info requested a week ago. . .

Why are you trying to use batch pipes to use the sorted data before the sort creates that sorted data?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Aug 14, 2008 4:16 am
Reply with quote

Hi,

Quote:
Does sort write data to sortout before the data is completely sorted ?


The answer to that as far as I'm concerned is no, many jobs use the same dataset as input and output.

Also when input is on cart in order to save tape drives, you can AFF the SORTOUT to the SORTIN DD, which tells me the SORTOUT DD is not opened until all of the data has been read in and the SORTIN DD has been closed.

If the data is not completely sorted how can you can guarantee the data will be written in the correct sequence ?

Gerry
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: Thu Aug 14, 2008 5:01 am
Reply with quote

Hi Gerry,

Quote:
The answer to that as far as I'm concerned is no, many jobs use the same dataset as input and output.
In the cases you mention, no the sort would not write to the output "in the middle" of working.

In other cases the sort might use the sortout dataset (assuming dasd and not the input dataset) as additional work space to make the sort run faster.

As i mentioned earlier, i do not know if this is still done, but there was a time when it was done.

FWIW - if i find production jcl that writes over the input in a sort step (and it is not a transient dataset - i.e. used only in "this" job) i get the jcl changed. Not much worse than sorting the transmitted input file over itself and losing the data due to some problem. Problems shouldn't happen, but datasets shouldn't be put at risk either.

Maybe we'll learn why batch pipes is being attempted for this "non-pipe" process. . .
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 -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts dsnrexx fails without error message CLIST & REXX 9
No new posts writing into VSAM indexed tabl in PL1... PL/I & Assembler 8
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
No new posts SORT ERROR PARAMETER VALUE EXCEEDS M... DFSORT/ICETOOL 12
Search our Forums:

Back to Top