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

Syncsort/TOOL Issue with trailer count in PD format


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vurasivaprasad

New User


Joined: 10 Dec 2005
Posts: 4
Location: HYDERABAD

PostPosted: Thu Aug 30, 2012 8:21 pm
Reply with quote

Hi pals,

I have small issue, while updating count in Trailer record which is in declared Fixed dec(15,0).
In our shop we have only SORT, I read some articles which is related to trailer count, unfortunately not succeeded.

input file having header, detail and trailer records. Omit the some bad records, count the detail records and update to trailer record.

bad records criteria is OMIT COND=(52,1,CH,EQ,C'N')

Input file...

Code:
1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
     2T 0000000000000000........000...... 12241 2T082812222149         (Header rec)
     2T 0000000000000000........000...... 12241 2T082812222149         (header rec)
     2T 609Z011007999000........TU ...... N100211CLC100211221150343LPC6    (detail rec)
     2T 609Z011007999000........TU ...... N100811CLC100811221437096LPC6
     2T 609Z011007999000........TU ...... N110211CLC110211221453332LPC6
     2T 609Z011007999000........TU ...... N120213CLC120213221558411LPC6
     2T 9999999999999999........999...... .......................ð                (trailer rec)

detail records are 42 position as 'TU'
Having more than one header records..
Trailer record scenario is 42 position as '999'

trailer count update in 68 posion to 8....
Record format . . . : FB
Record length . . . : 225

I tried using below
Code:
//SYSIN    DD  *                                                       
  SORT FIELDS=COPY                                                     
  OMIT COND=(52,1,CH,EQ,C'N')                                         
    OUTREC IFOUTLEN=225,                                               
    IFTHEN=(WHEN=(42,2,CH,EQ,C'TU'),OVERLAY=(225:SEQNUM,8,PD,START=0))
    IFTHEN=(WHEN=(42,3,CH,EQ,C'999'),OVERLAY=(68:225,8))               
  /*




Thanks in advance
Sivaprasad.
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 30, 2012 8:26 pm
Reply with quote

1. Please use some better topic-titles. You've used the Forum name.
2. Second, Submit this Job and post us the SYSOUT, so we know, what SORT product you are using:
Code:
//STEP010  EXEC PGM=SORT
//SYSOUT   DD SYSOUT=* 
//SORTIN   DD *         
RECORD                 
//SORTOUT  DD DUMMY     
//SYSIN    DD *         
  OPTION COPY           
//*                     

3. Learn to use BB Code Tags. I've edited your Post to add the code tags. Not sure if the alignment is preserved...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 30, 2012 8:28 pm
Reply with quote

Quote:
In our shop we have only SORT


please learn and read instead of speaking out of ignorance.

if you have DFSORT, you automatically have ICETOOL.
If you have SYNCSORT, you automatically have SYNCTOOL.

most sites are setup that allow one to just say PGM=SORT
and either DFSORT or SYNCSORT (which ever is installed)
will be invoked.

Quote:
I read some articles which is related to trailer count, unfortunately not succeeded.


you would have better results if you were to read the manuals.
Back to top
View user's profile Send private message
vurasivaprasad

New User


Joined: 10 Dec 2005
Posts: 4
Location: HYDERABAD

PostPosted: Thu Aug 30, 2012 8:33 pm
Reply with quote

Anuj,

Thx for immediate response
get the below info..

Code:
SYSIN :                                                                       
  OPTION COPY                                                           0014000
WER903I  SYNCSORT 1.4.0.0 IS NOT LICENSED FOR SERIAL 4EE77, TYPE 2817 615, LPAR
WER903I  PRODUCT WILL STOP WORKING IN  36 DAYS UNLESS A VALID KEY IS INSTALLED.
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
WER073I  SORTIN   : DSNAME=z231331.SORTBILL.JOB41021.D0000101.?               
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
WER074I  SORTOUT  : DSNAME=NULLFILE                                           
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER054I  RCD IN          1, OUT          1                                     
WER169I  RELEASE 1.4 BATCH 0518 TPF LEVEL 0.0                                 
WER052I  END SYNCSORT - SORTBILL,STEP010,,DIAG=A400,62C6,88AA,0044,EC56,48CB,0E
Back to top
View user's profile Send private message
vurasivaprasad

New User


Joined: 10 Dec 2005
Posts: 4
Location: HYDERABAD

PostPosted: Tue Sep 04, 2012 5:17 pm
Reply with quote

Get a chance to help in this Syncsort.

Having any idea please let us know.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Sep 04, 2012 5:26 pm
Reply with quote

Please do not solicit for answers

You should remember that ...
replying on a forum is

on voluntary base
on our own time
free of charge

therefore
there is no commitment on our side
there should be no expectation on Your side

You should also consider that many - too many - topics/issues have been debated to death
so many of us are getting tired of reposting the same info code snippets over and over

if You search the forum and look at the manuals You will find certainly what You look for

also looking at the DFSORT documents You might find solution easily portable to SYNCSORT

www-01.ibm.com/support/docview.wss?uid=isg3T7000094
www-01.ibm.com/support/docview.wss?uid=isg3T7000080
www-01.ibm.com/support/docview.wss?uid=isg3T7000097
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 04, 2012 6:39 pm
Reply with quote

You're nearly there, you just have not got the data propogated from one record to the next.

You do that with PUSH.

PUSH requires WHEN=GROUP.

WHEN=GROUP is processed after WHEN=INIT and before WHEN=(logical expression).

So, change your OUTREC to INREC and just set the sequence number as you have it (remove the IFOUTLEN).

On a new OUTREC, with the IFOUTLEN, use WHEN=GROUP to start at the detail record, with RECORDS=2, and PUSH the sequence number (can be done to the same posisition).

Then you should find your code for the trailer works.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top