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
 

 

Batch Pipe error in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: Batch Pipe error in JCL
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 07, 2008 12:00 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Aug 07, 2008 12:29 pm    Post subject:
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

Site Director


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

PostPosted: Thu Aug 07, 2008 7:49 pm    Post subject:
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    Post subject: Reply to: Batch Pipe error in JCL
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

Site Director


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

PostPosted: Thu Aug 07, 2008 11:42 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 08, 2008 12:21 pm    Post subject:
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

Site Director


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

PostPosted: Fri Aug 08, 2008 8:53 pm    Post subject:
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    Post subject: Reply to: Batch Pipe error in JCL
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

Site Director


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

PostPosted: Thu Aug 14, 2008 2:13 am    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Aug 14, 2008 4:16 am    Post subject:
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

Site Director


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

PostPosted: Thu Aug 14, 2008 5:01 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts HLIST Utility In Batch Virendra Shambharkar TSO/ISPF 4 Fri Apr 07, 2017 3:38 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Batch job tuning sgandhla Testing & Performance analysis 5 Fri Mar 24, 2017 9:41 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am


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