View previous topic :: View next topic
|
Author |
Message |
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
I have a flat file.
My requirement is to get the System date.
Number of records from the input file.
Using the following structure write (append) it to another flat file.
Structure of the Output file is
1:10 --> System Date
11:3 --> '033' (Hard Coded value. This remains constant always)
14:10 --> 'Table Name' (Hard Coded value. This remains constant always)
24:12 --> Records Count
Please let me know using Syncsort how to code the JCL for the above requirement. Your help is greatly appreciated. Thank You. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello Muralee,
Try out this one. You may change the card as per your file attributes.
Code: |
//SYSIN DD *
INREC OVERLAY=(81:C'000000000001')
SORT FIELDS=(1,80,CH,A)
SUM FIELDS=(81,12,ZD)
OUTREC FIELDS=(&DATE1(-),C'033your table',81,12) |
Thanks,
Arun |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
Thank You Arun for Your response.
I tested the JCL using sort parameters provided by you.
It is giving error on OVERLAY parameter.
In our facility we are using SYNCSORT version 1.2.0.1R.
I am not sure if this version supports OVERLAY parameter or not. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please post your jcl, sort control statements, and the complete diagnostic info from the problem run.
Use copy/paste and the "Code" tag to make your post more readable. Please - Do not re-key any of this. |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
My input file record length is 183 and I want to use this file to count no of records only and I do not want to sort it.
JCL:
Code: |
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=FILE1
//SORTOUT DD DSN=FILE2
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INREC OVERLAY=(24:C'000000000001')
SORT FIELDS=(1,183,CH,A)
SUM FIELDS=(24,12,ZD)
OUTREC FIELDS=(&DATE1(-),C'033TABLE NAME',24,12)
/*
// |
Diagnostic Info:
Code: |
SYSIN :
INREC OVERLAY=(24:C'000000000001')
*
SORT FIELDS=(1,183,CH,A)
SUM FIELDS=(24,12,ZD)
OUTREC FIELDS=(&DATE1(-),C'033TABLE NAME',24,12)
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000 |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Sorry, my mind was on break earlier. . .
OVERLAY requires the current release of Syncsort (1.3).
I lied. . . Please see below. d |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
Yesterday SYNCSORT FOR Z/OS 1.3.0.0N has been installed in our Mainframe. Currently they did it in Test region and asked us to use the following steplib
Code: |
//STEPLIB DD DSN=SYSMPR.SYNCSORT.SYNCLINK,DISP=SHR
// DD DSN=SYSMPR.SYNCSORT.SYNCRENT,DISP=SHR |
Now My JCL Looks Like
Code: |
//STEP1 EXEC PGM=SORT
//STEPLIB DD DSN=SYSMPR.SYNCSORT.SYNCLINK,DISP=SHR
// DD DSN=SYSMPR.SYNCSORT.SYNCRENT,DISP=SHR
//SORTIN DD DSN=FILE1,DISP=SHR
//SORTOUT DD DSN=FILE2,DISP=MOD
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,1)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,1)
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,1)
//SORTWK04 DD UNIT=SYSDA,SPACE=(CYL,1)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INREC OVERLAY=(24:C'000000000001')
SORT FIELDS=(1,183,CH,A)
SUM FIELDS=(24,12,ZD)
OUTREC FIELDS=(&DATE1(-),C'033TABLE NAME',24,12)
/*
// |
Still I am getting the error
Code: |
SYSIN :
INREC OVERLAY=(24:C'000000000001')
SORT FIELDS=(1,183,CH,A)
SUM FIELDS=(24,12,ZD)
OUTREC FIELDS=(&DATE1(-),C'033TABLE NAME',24,12)
WER186I SVC 201 IS INCORRECT VERSION OR NOT A SYNCSORT SVC; SVC NOT USED - INEFFICIENT SORT
WER164B 6,896K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER220A ILLEGAL OVERLAPPING OF SUM FIELDS
WER108I SORTIN : RECFM=VB ; LRECL= 183; BLKSIZE= 27998
WER211I SYNCSMF CALLED BY SYNCSORT; RC=0036 |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Still I am getting the error |
Yes, but not because of OVERLAY. . .
Code: |
WER186I SVC 201 IS INCORRECT VERSION OR NOT A SYNCSORT SVC; |
You need to show this to your Systems people who installed the new release. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
dick scherrer wrote: |
OVERLAY requires the current release of Syncsort (1.3). |
Correction, it requires SyncSort for z/OS 1.2.1.0 or later. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Code: |
WER186I SVC 201 IS INCORRECT VERSION OR NOT A SYNCSORT SVC; SVC NOT USED - INEFFICIENT SORT |
This is an informational message which should be addressed. However, it should not cause the job to fail.
The following is the real problem:
Code: |
WER220A ILLEGAL OVERLAPPING OF SUM FIELDS |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Alissa,
Sorry for the mis-info. . .
I replied as i did because my Syncsort 1.2 manual has this right after the table of contents:
Quote: |
SyncSort for z/OS Release 1.2 - Summary of Changes
The 1.2.1 (TPF1) level of SyncSort for z/OS Release 1.2 was preceded by SyncSort for z/OS Release 1.2.0. This Summary of Changes identifies changes for both release levels as follows: |
In this doc, OVERLAY is not among the "Control Statements" and using the pdf search ges 0 hits.
Do i have the wrong 1.2 manual?
Thanks,
d |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Hi Dick.
No, you don't have the wrong manual. We released an Addendum to the SyncSort for z/OS 1.2 Programmer's to include the features and enhancements built into 1.2.1.0. If you don't have it, send me a quick note offline and I can send it to you. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Alissa,
Aaarggh. . .
Quote: |
Addendum. BUILD, IFTHEN, IFOUTLEN, and
OVERLAY Parameters |
Yup, i do have it and forgot to look there. . . d'oh. . .
Thanks again,
d |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I'm a bit confused with this request,
Quote: |
My input file record length is 183 and I want to use this file to count no of records only and I do not want to sort it.
|
You do NOT want to sort it yet there are SORT FIELDS, the File is VB and not FB, so the data starts at byte 5 and not 1.
Gerry |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
Yes. You are right. Data should start at position 5. Sorry for the Confusion created.
Since Arun suggested me to use SORT FIELDS so I was trying with that option.
Since 5 days I am trying to get hold of a solution for this problem but could not succeed.
Still I am waiting from the Forum to get some solution.
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Did you correct the error Alissa pointed out - about the overlap with the sum field?
Quote: |
EXPLANATION: A SUM field overlaps another SUM field, a SORT/
MERGE control field or the Record Descriptor Word of a variable-length
record. All of these are illegal. |
You need to correct the overlap between the sort field and the sum field. If you have corrected the overlap and still have problems, post back the current problem. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello Muralee,
The solution given was for an FB file of LRECL=80. Now you can change it as per your requirement. My release is Syncsort 1.2 which supports OVERLAY.
Thanks,
Arun |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
Thank You Arun.
The following code worked for me.
Code: |
INREC OVERLAY=(196:SEQNUM,12,ZD)
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(&DATE=(MD4/),C'|83 ',
C'|TABLE-NAME |',196,12),CONVERT |
Thank You All/ibmmainframes.com for Helping me to get a solution. |
|
Back to top |
|
|
|