control card exceeding the length 72



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

control card exceeding the length 72

Postby Mahalakshmi R » Wed Aug 26, 2009 7:11 pm

Hi All,

The following is the code which i wanted to code at SYSIN in SORT step.
  SORT FIELDS=COPY                                                   
  OUTREC FIELDS=(C'   OUTFIL FNAME=SORTOF03,INCLUDE= (24,8,CH,LE,C''',6,8,C''')’,39X,
                 C’   OUTFIL FNAME=SORTOF04,INCLUDE= (24,8,CH,GT,C''',6,8,C''')',39X) 

As the following control statement exceeding its length 72 in JCL, I'm getting MaxComp as AB U0016.
  OUTREC FIELDS=(C'   OUTFIL FNAME=SORTOF03,INCLUDE= (24,8,CH,LE,C''',6,8,C''')’,39X,


SYSOUT information:
[img]SYSIN :
SORT FIELDS=COPY
OUTREC FIELDS=
*
(C' OUTFIL FNAME=SORTOF03,INCLUDE= (24,8,CH,LE,C''',6,8,C''')',39X,
*
C' OUTFIL FNAME=SORTOF04,INCLUDE= (24,8,CH,GT,C''',6,8,C''')',39X)
*
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT [/img]

I also tried with the JCL continuation character '-' and did not get the results.

Can anyone suggest me to solve this issue.
Thanks,
Mahalakshmi Rajendran
Mahalakshmi R
 
Posts: 13
Joined: Mon Jul 13, 2009 4:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: control card exceeding the length 72

Postby expat » Wed Aug 26, 2009 7:23 pm

I suggest that you take a little time and read the SYNCSORT manual for the correct syntax.

If you are trying to split a file by condition, then this may help with the correct synatx, although this is a DFSORT solution but the syntax is probably close enough.

//SORTIN   DD DSN=Input file 1,DISP=SHR         
//         DD DSN=Input file 2,DISP=SHR           
//SORTOF1  DD DSN=&&MCDSSORT,DISP=(,PASS,DELETE),   
//            SPACE=(CYL,(100,10),RLSE),             
//            RECFM=VB,LRECL=170                     
//SORTOF2  DD DSN=&&BCDSSORT,DISP=(,PASS,DELETE),   
//            SPACE=(CYL,(100,10),RLSE),             
//            RECFM=VB,LRECL=170                     
//SORTOF3  DD DSN=&&MGMTCLAS,DISP=(,PASS,DELETE),   
//            SPACE=(CYL,(10,10),RLSE)               
//SORTOF4  DD DSN=&&DASDSORT,DISP=(,PASS,DELETE),   
//            SPACE=(CYL,(170,10),RLSE),             
//            RECFM=VB,LRECL=170                     
//SORTOF5  DD DSN=&&VSAMSORT,DISP=(,PASS,DELETE),   
//            SPACE=(CYL,(170,10),RLSE),                 
//            RECFM=VB,LRECL=170                         
//SORTOF6  DD DSN=&&VSAMINDX,DISP=(,CATLG,DELETE),       
//            SPACE=(CYL,(170,10),RLSE),                 
//            RECFM=VB,LRECL=170                         
//SYSIN    DD *                                           
  OPTION  VLSHRT VLSCMP                                   
  SORT    FIELDS=(29,44,A),FORMAT=CH                     
  OUTFIL  FILES=1,INCLUDE=(9,2,CH,EQ,C'M ',AND,           
                189,1,BI,NONE,B'01000000',AND,           
                73,1,BI,ALL,B'10000000'),                 
          OUTREC=(1,4,29,44,1X,155,8,6X,C'M',1X,         
          205,4,1X,221,4,1X,193,4,1X,73,1),VLFILL=X'40'   
  OUTFIL  FILES=2,INCLUDE=(9,2,CH,EQ,C'B '),             
          OUTREC=(1,4,29,44,1X,155,8,6X,C'B'),VLFILL=X'40'
  OUTFIL  FILES=3,INCLUDE=(9,2,CH,EQ,C'MC')               
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: control card exceeding the length 72

Postby Mahalakshmi R » Thu Aug 27, 2009 11:30 am

Thanks expat,

I got what you have mentioned.
The syntax which i have mentioned cannot split the files and used to build the characters which specified in C' ' to a PS file.

My requirement is to build the following statements into a PS file which has the record length of 80.

OUTFIL FNAME=SORTOF03,INCLUDE= (24,8,CH,LE,C''',6,8,C''')
OUTFIL FNAME=SORTOF04,INCLUDE= (24,8,CH,GT,C''',6,8,C''')

That is from the 3rd position i need the line OUTFIL FNAME=SORTOF03,INCLUDE= (24,8,CH,LE,C''',6,8,C''')
and remaining positions should be blank (in 80 record length). similar way the second line. Finally i need two records in my output file. This file will be used in many sort steps.

I hope now the requirement is much clear.

If we give these records into a SORTIN card also we can get that into SORTOUT file using option COPY.

Is there anyway we can modify only the control card to get the results.
Thanks,
Mahalakshmi Rajendran
Mahalakshmi R
 
Posts: 13
Joined: Mon Jul 13, 2009 4:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: control card exceeding the length 72

Postby Mahalakshmi R » Thu Aug 27, 2009 12:03 pm

One more thing i forgot to mention.

The SORTIN file wich i have will contain the date field from position 6 (8 char).

This date will be taken to build the SORTOUT record.

The solution i tried is follows for one record:
Input:
SORTIN file contains position 6:8 as '20090529' and has only one record.

Controld card info:
SORT FIELDS=COPY                                                 
OUTREC FIELDS=(1:C'  ',                                           
   3:C'OUTFIL FNAME=SORTOF03,INCLUDE=(24,8,CH,LE,C''',6,8,C''')',
   23X)                                                           


Output:
OUTFIL FNAME=SORTOF03,INCLUDE=(24,8,CH,LE,C'20090529')

Similar way i need for the next record too in the same step.
Thanks,
Mahalakshmi Rajendran
Mahalakshmi R
 
Posts: 13
Joined: Mon Jul 13, 2009 4:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: control card exceeding the length 72

Postby arcvns » Thu Aug 27, 2009 7:23 pm

Mahalakshmi R,

Instead of generating sort control statements, why not try creating symbols for the date value and access it using SYMNAMES. Here's an untested example for the same.
//STEP1    EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN= Input date-file                             
//SORTOUT  DD DSN=&&S1,DISP=(,PASS)         
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                             
  INREC BUILD=(C'DATE-X,''',6,8,C'''',80:X)
  SORT FIELDS=COPY                           
//STEP2    EXEC PGM=SORT                     
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN= Input file                             
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTOF03  DD DSN= Output file
//SYSIN    DD *                       
  SORT FIELDS=COPY
  OUTFIL FNAMES=SORTOF03,INCLUDE=(24,8,CH,LE,DATE-X)
  OUTFIL FNAMES=SORTOF04,INCLUDE=(24,8,CH,GT,DATE-X)
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: control card exceeding the length 72

Postby Mahalakshmi R » Thu Aug 27, 2009 8:03 pm

Thanks a lot Arun.

I have modified the code as you have mentioned.
This working perfectly.
Thanks,
Mahalakshmi Rajendran
Mahalakshmi R
 
Posts: 13
Joined: Mon Jul 13, 2009 4:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: control card exceeding the length 72

Postby arcvns » Thu Aug 27, 2009 9:23 pm

Mahalakshmi R

You're welcome. Good to hear it's working :)

Can you post here your final control cards?
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: control card exceeding the length 72

Postby Mahalakshmi R » Fri Aug 28, 2009 10:48 am

As my priority was to get the date and generate the control cards at the first step, i did not change the sytax in the statements
OUTFIL FNAME=SORTOF03,INCLUDE= (24,8,CH,LE,C''',6,8,C''')
OUTFIL FNAME=SORTOF04,INCLUDE= (24,8,CH,GT,C''',6,8,C''')

The modified and final code is follows:
first step:
INREC BUILD=(C'DATE-X,''',6,8,C'''',80:X)
SORT FIELDS=COPY                         


second step:
SORT FIELDS=COPY                             
  OUTFIL FILES=03,INCLUDE=(24,8,CH,LE,DATE-X)
  OUTFIL FILES=04,INCLUDE=(24,8,CH,GT,DATE-X)


Once again thanks Arun.
Thanks,
Mahalakshmi Rajendran
Mahalakshmi R
 
Posts: 13
Joined: Mon Jul 13, 2009 4:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: control card exceeding the length 72

Postby arcvns » Mon Aug 31, 2009 9:53 pm

Mahalakshmi Rajendran,

If you have only 2 conditions as shown above, you can further simplify it using the SAVE parameter which captures all the records which got skipped in the first INCLUDE.
  SORT FIELDS=COPY                             
  OUTFIL FILES=03,INCLUDE=(24,8,CH,LE,DATE-X)
  OUTFIL FILES=04,SAVE
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post