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
 

 

Syncsort -> How to get system date + records count of a f

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Tue Jul 29, 2008 3:23 am    Post subject: Syncsort -> How to get system date + records count of a f
Reply with quote

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
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Tue Jul 29, 2008 9:05 am    Post subject:
Reply with quote

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
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Tue Jul 29, 2008 8:30 pm    Post subject: Reply to: Syncsort -> How to get system date + records co
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Jul 29, 2008 11:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Wed Jul 30, 2008 1:13 am    Post subject: Reply to: Syncsort -> How to get system date + records co
Reply with 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.

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Jul 30, 2008 3:07 am    Post subject:
Reply with quote

Hello,

Sorry, my mind was on break earlier. . . icon_redface.gif

OVERLAY requires the current release of Syncsort (1.3).
I lied. . . Please see below. d
Back to top
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Wed Jul 30, 2008 8:29 pm    Post subject: Reply to: Syncsort -> How to get system date + records co
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Jul 30, 2008 10:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Aug 01, 2008 12:50 am    Post subject:
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Aug 01, 2008 12:54 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Aug 01, 2008 1:00 am    Post subject: Reply to: Syncsort -> How to get system date + records co
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Aug 01, 2008 1:03 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Aug 01, 2008 1:15 am    Post subject: Reply to: Syncsort -> How to get system date + records co
Reply with quote

Hi Alissa,

Aaarggh. . . icon_redface.gif

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Aug 01, 2008 5:12 am    Post subject:
Reply with quote

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
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Sat Aug 02, 2008 12:32 am    Post subject: Reply to: Syncsort -> How to get system date + records co
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sat Aug 02, 2008 1:01 am    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Sun Aug 03, 2008 1:51 am    Post subject:
Reply with quote

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
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Thu Aug 07, 2008 9:42 pm    Post subject: Reply to: Syncsort -> How to get system date + records co
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am


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