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
 

 

Resize ( sort of ) for SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
madmartinsonxx

New User


Joined: 10 Dec 2010
Posts: 96
Location: Massachusetts

PostPosted: Sat Feb 16, 2013 2:06 am    Post subject: Resize ( sort of ) for SYNCSORT
Reply with quote

Code:

//REPEAT EXEC PGM=SYNCSORT                       
//SYSOUT  DD SYSOUT=*                           
//RPTSQ   DD SYSOUT=*                           
//SORTOUT DD SYSOUT=*                           
//SORTIN  DD *                                   
 NOTTA                                           
/*                                               
//SYSIN     DD *                                 
  SORT FIELDS=COPY                               
  OUTFIL FNAMES=RPTSQ,                           
    OVERLAY=(01:C'01,02,A_SPACE,25,09,A_SPACE,',
      SEQNUM,8,ZD,START=0110,INCR=030,C',30,/,'),
        REPEAT=10                               
/*                                               
//* END OF BUILD                                 
//                                               


this shop is a syncsort shop and i found out the hard way. After trying to use RESIZE and getting frustrated I thought there must be a way around it. The records I had to break down had an OCCURS Clause of 50. I was typing away trying to get the exact byte count and place it into my build and I was making a lot of mistakes. I ended up researching this wonderful forum and found my way to SEQNUM and REPEAT=.
This worked great after getting the syntax errors debugged.
I finally got my cards output to where I can drag them into my next go around with COBOL Occurs.
they look like this...

Code:

01,02,A_SPACE,25,09,A_SPACE,00000110,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000140,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000170,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000200,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000230,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000260,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000290,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000320,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000350,30,/,
01,02,A_SPACE,25,09,A_SPACE,00000380,30,/,


Hope this helps somebody who is facing what I am every day. Cheers.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Sat Feb 16, 2013 3:11 pm    Post subject: Reply to: Resize ( sort of ) for SYNCSORT
Reply with quote

Thanks madmartinsoxx, already suggested it to someone (they may not look at it).

Here's my take on it, with symbols/SYMNAMES:

Code:
IN-RECORD-AREA,1,409,CH
IN-RA-ID,=,2,CH            # = GETS START OF PREVIOUS FIELD
  SKIP,22                  # LIKE A FILLER
IN-RA-ACCOUNT,*,9,CH
  SKIP,76                  # LIKE A FILLER
IN-RA-OCCURS01,*,30,CH     # * GETS FIRST POSITION AFTER PREVIOUS FIELD
IN-RA-OCCURS02,*,30,CH
IN-RA-OCCURS03,*,30,CH
IN-RA-OCCURS04,*,30,CH
IN-RA-OCCURS05,*,30,CH
IN-RA-OCCURS06,*,30,CH
IN-RA-OCCURS07,*,30,CH
IN-RA-OCCURS08,*,30,CH
IN-RA-OCCURS09,*,30,CH
IN-RA-OCCURS10,*,30,CH


Code:
   SORT FIELDS=COPY,STOPAFT=1
   OUTFIL FNAMES=RPTSQ,
     OVERLAY=(01:80X,03:C'IN-RA-ID,X,IN-RA-ACCOUNT,X,',
       C'IN-RA-OCCURS',SEQNUM,2,ZD,START=1,INCR=1,C',/,'),
         REPEAT=10


Gets you

Code:
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS01,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS02,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS03,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS04,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS05,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS06,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS07,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS08,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS09,/,
  IN-RA-ID,X,IN-RA-ACCOUNT,X,IN-RA-OCCURS10,/,


Once you've got the symbols, for 10 it is easy enough with the editor, but for 100 can help.

You could also look at generating symbols from a "stub" Cobol program containing the record-layout in question. Then no calculations at all.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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