Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

JCL to compare counts
I would like to do the following in a JCL using ICETOOL or any other
standard tools available.

I have a dataset with the last record (trailer record) containing
number of records in the dataset excluding the trailer.
I would like to count the number of records (excluding the trailer
record) and compare the number with the value stored as the first 13
bytes of the trailer record. If both numbers are equal, I would like to
set the RC = 0 in the JCL.

Example
DRU034
CPC045
RFK056
000000003


Report this thread to moderator Post Follow-up to this message
Old Post
dharmadam_man@hotmail.com
04-19-05 08:55 PM


Re: JCL to compare counts
dharmadam_man@hotmail.com wrote:
> I would like to do the following in a JCL using ICETOOL or any other
> standard tools available.
>
> I have a dataset with the last record (trailer record) containing
> number of records in the dataset excluding the trailer.
>  I would like to count the number of records (excluding the trailer
> record) and compare the number with the value stored as the first 13
> bytes of the trailer record. If both numbers are equal, I would like
to
> set the RC = 0 in the JCL.
>
> Example
> DRU034
> CPC045
> RFK056
> 000000003

You said the value is stored as the first 13 bytes of the trailer
record, but your example show only 9 bytes.  Assuming that the count in
the trailer record is really in bytes 1-13, you can use this
DFSORT/ICETOOL job below to set RC=0 if the trailer count equals the
data record count - 1 or RC=12 if they aren't equal.  You'll need z/OS
DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) to use
DFSORT's new COUNT-n=(edit/to) parameter.  If you have DFSORT, but you
don't have the Dec, 2004 PTF installed, ask your System Programmer to
install it (it's free).  For complete details on all of the new DFSORT
and ICETOOL functions available with the Dec, 2004 PTF, see:

www.ibm.com/servers/storage/support.../sort/mvs/pdug/

Here's the DFSORT/ICETOOL job.  If you want RC=4 instead of RC=12, add
RC4 to the COUNT operator:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file
//T1 DD DSN=&& T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,P
ASS)
//TOOLIN DD *
* Create an output record in T1 with:
* xxxxxxxxxxxxx yyyyyyyyyyyyy
* where x...x is the trailer count and y...y is the data count - 1.
COPY FROM(IN) USING(CTL1)
* If the counts are equal, set RC=0.
* If the counts are not equal, set RC=12.
COUNT FROM(T1) EMPTY USING(CTL2)
* If you want RC=4 instead of RC=12, change the
* COUNT operator to:
* COUNT FROM(T1) EMPTY USING(CTL2) RC4
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
TRAILER1=(1,13,15:COUNT-1=(M11,LENGTH=13))
/*
//CTL2CNTL DD *
INCLUDE COND=(1,13,ZD,EQ,15,13,ZD)
/*

Frank Yaeger - DFSORT Team  (IBM) - yaeger@us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/


Report this thread to moderator Post Follow-up to this message
Old Post
yaeger@us.ibm.com
04-19-05 08:55 PM


Re: JCL to compare counts
Thanks for the quick response. It was a mistake on my part to include
all 13 bytes in the trailer record.

Unfortunately, I think, we don't have the latest version. I was getting
the following message.
SYNCSORT FOR Z/OS  1.1DNI  TPF3   U.S. PATENTS: 4210961, 5117495  (C)
2002 SYNC
AFFILIATED COMPUTER SERVICES   z/OS
1.4.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER 9310F, MODEL 2064 110
LICEN
CTL1CNTL :

OUTFIL FNAMES=3DT1,REMOVECC,NODETAIL,

TRAILER1=3D(1,13,15:COUNT-1=3D(M11 ,LENGTH=3D13))

*

WER428I  CALLER-PROVIDED IDENTIFIER IS "0001"

WER268A  OUTFIL STATEMENT  : SYNTAX ERROR



My JCL is included

//QCPI039S JOB (3CCP911525RBL),'SORT',
//          CLASS=3DG,MSGCLASS=3DX,MSGLEVEL=3D(1,1),

//         NOTIFY=3DQCPI039
//*
//S1    EXEC  PGM=3DICETOOL
//TOOLMSG DD SYSOUT=3D*
//DFSMSG DD SYSOUT=3D*
//IN       DD DSN=3DQCPJNT.DWP.CCR.TRXCLAIM.EXTERNAL.G0018V00,
//         DISP=3DSHR
//T1       DD DSN=3DQCPJNT.DWP.CCR.TRXCLAIM.EXTERNAL.DATA,
//         DISP=3D(NEW,CATLG,CATLG),
//            UNIT=3DSYSDA,
//            SPACE=3D(CYL,(800,5),RLSE),
//            DCB=3D(ACSNS. DSCB,BLKSIZE=3D0,LRECL=3D700,RECFM=3DFB)

//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COUNT FROM(T1) EMPTY USING(CTL2)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=3DT1,REMOVECC,NODETAIL,
TRAILER1=3D(1,13,15:COUNT-1=3D(M11=AD,LENGTH=3D13))
/*
//CTL2CNTL DD *
INCLUDE COND=3D(1,13,ZD,EQ,15,13,ZD)
/*


Report this thread to moderator Post Follow-up to this message
Old Post
dharmadam_man@hotmail.com
04-20-05 01:55 AM


Re: JCL to compare counts
OH ...

You have SyncSort and NOT DFSort.

"ICETOOL" (I believe) is a DFSort only product.  I think SyncSort has a simi
lar
feature, but not called that.  As Frank works for IBM - on DFSort, he is not
 the
right person to ask about SyncSort questions.  Hopefully someone else will r
eply
from that product.

--
Bill Klein
wmklein <at> ix.netcom.com
<dharmadam_man@hotmail.com> wrote in message
news:1113943618.340713.235130@l41g2000cwc.googlegroups.com...
Thanks for the quick response. It was a mistake on my part to include
all 13 bytes in the trailer record.

Unfortunately, I think, we don't have the latest version. I was getting
the following message.
SYNCSORT FOR Z/OS  1.1DNI  TPF3   U.S. PATENTS: 4210961, 5117495  (C)
2002 SYNC
AFFILIATED COMPUTER SERVICES   z/OS
1.4.0
PRODUCT LICENSED FOR CPU SERIAL NUMBER 9310F, MODEL 2064 110
LICEN
CTL1CNTL :

OUTFIL FNAMES=T1,REMOVECC,NODETAIL,

TRAILER1=(1,13,15:COUNT-1=(M11 ,LENGTH=13))

*

WER428I  CALLER-PROVIDED IDENTIFIER IS "0001"

WER268A  OUTFIL STATEMENT  : SYNTAX ERROR



My JCL is included

//QCPI039S JOB (3CCP911525RBL),'SORT',
//         CLASS=G,MSGCLASS=X,MSGLEVEL=(1,1),
//         NOTIFY=QCPI039
//*
//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN       DD DSN=QCPJNT.DWP.CCR.TRXCLAIM.EXTERNAL.G0018V00,
//         DISP=SHR
//T1       DD DSN=QCPJNT.DWP.CCR.TRXCLAIM.EXTERNAL.DATA,
//         DISP=(NEW,CATLG,CATLG),
//            UNIT=SYSDA,
//            SPACE=(CYL,(800,5),RLSE),
//            DCB=(ACSNS.DSCB,BLKSIZE=0,LRECL=700,RECFM=FB)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COUNT FROM(T1) EMPTY USING(CTL2)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
TRAILER1=(1,13,15:COUNT-1=(M11_,LENGTH=13))
/*
//CTL2CNTL DD *
INCLUDE COND=(1,13,ZD,EQ,15,13,ZD)
/*



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
04-20-05 01:55 AM


Re: JCL to compare counts
dharmadam_man@hotmail.com wrote:
> Thanks for the quick response. It was a mistake on my part to include
> all 13 bytes in the trailer record.
>
> Unfortunately, I think, we don't have the latest version. I was
getting
> the following message.
> SYNCSORT FOR Z/OS  1.1DNI  TPF3   U.S. PATENTS: 4210961, 5117495  (C)
> 2002 SYNC
>                                     AFFILIATED COMPUTER SERVICES
z/OS
>   1.4.0
> PRODUCT LICENSED FOR CPU SERIAL NUMBER 9310F, MODEL 2064 110
>   LICEN
> CTL1CNTL :
>
>   OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
>
>     TRAILER1=(1,13,15:COUNT-1=(M11 ,LENGTH=13))
>
>                   *
>
> WER428I  CALLER-PROVIDED IDENTIFIER IS "0001"
>
> WER268A  OUTFIL STATEMENT  : SYNTAX ERROR

The job I posted works fine with DFSORT's ICETOOL.  But you're using
Syncsort, not DFSORT.  COUNT-n=(edit/to) and COUNT+n=(edit/to) are
exclusive DFSORT functions.  You can't use them with Syncsort.  As a
DFSORT developer, I'm happy to answer questions on DFSORT and DFSORT's
ICETOOL, but I don't answer questions on Syncsort.

Frank Yaeger - DFSORT Team  (IBM) - yaeger@us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/


Report this thread to moderator Post Follow-up to this message
Old Post
yaeger@us.ibm.com
04-20-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:16 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.