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: 7315

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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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