Selecting One Field from Block of dataset..



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Selecting One Field from Block of dataset..

Postby gokulNmf » Sat Jun 27, 2009 4:57 pm

Hi all,
I am having 5 DS (DATA SET) of diffrent lrecl, but i want the first 10 charecter from all the DS, so i used the below code
to to get those 10 chars into the "PGM25.DS ENDDS.OUTPUT" .
but i am getting MAXCC 16 :( and checking in the SYSOUT :shock: the reason stated was
"INVALID DATA SET ATTRIBUTES: SORTIN LRECL - REASON CODE IS 05"
I couldnt make out the problem..
what is wrong in this code :? :x and how to solve it :?: :idea:

//SORT09   EXEC PGM=SORT
//SORTIN   DD  DSN=PGM125.END100.OUTPUT,
//             DISP=SHR
//         DD  DSN=PGM125.END103.OUTPUT,
//             DISP=SHR
//         DD  DSN=PGM125.VEND106.OUTPUT,
//             DISP=SHR
//         DD  DSN=PGM125.END107.OUTPUT,
//             DISP=SHR
//         DD  DSN=PGM125.END114.OUTPUT,
//             DISP=SHR
//SORTOUT  DD  DSN=PGM125.ENDDS.OUTPUT,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(2,2),RLSE),
//             DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)
//SYSIN    DD   *
  SORT FIELDS=(1,10,CH,A)
  INREC FIELDS =(1,10)
  SUM FIELDS=NONE
/*
//SYSOUT   DD  SYSOUT=*
//*


Thnaks in Advance.
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 114
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: Selecting One Field from Block of dataset..

 

Re: Selecting One Field from Block of dataset..

Postby gokulNmf » Sat Jun 27, 2009 5:58 pm

the lrel of
END100 is 09, END103 IS150, END106 IS 132, END107 IS 156 AND END114 IS 146
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 114
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: Selecting One Field from Block of dataset..

Postby gokulNmf » Sat Jun 27, 2009 5:59 pm

gokulNmf wrote:the lrel of
END100 is 10, END103 IS150, END106 IS 132, END107 IS 156 AND END114 IS 146
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 114
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: Selecting One Field from Block of dataset..

Postby dick scherrer » Sat Jun 27, 2009 11:05 pm

Hello,

"INVALID DATA SET ATTRIBUTES: SORTIN LRECL - REASON CODE IS 05"
I couldnt make out the problem..
The lrecl is the problem. . .

You should not concatenate fixed length records of different lengths. . .

You also want to bookmark (or download) this link to the Table of Contents in JCL Reference manual:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/CONTENTS?
And this:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/12.1.6.1?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Selecting One Field from Block of dataset..

Postby Frank Yaeger » Sat Jun 27, 2009 11:12 pm

You can't use concatenated FB data sets with different LRECLs. You can use a DFSORT/ICETOOL job like the following instead. Since you had LRECL=80 for the output file, I assumed you wanted to pad the output records with blanks to 80 bytes.

//SORT09   EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1   DD  DSN=PGM125.END100.OUTPUT,
//          DISP=SHR
//IN2   DD  DSN=PGM125.END103.OUTPUT,
//          DISP=SHR
//IN3   DD  DSN=PGM125.VEND106.OUTPUT,
//          DISP=SHR
//IN4   DD  DSN=PGM125.END107.OUTPUT,
//          DISP=SHR
//IN5   DD  DSN=PGM125.END114.OUTPUT,
//          DISP=SHR
//T1   DD   DSN=&&T1,DISP=(MOD,PASS),
//          SPACE=(CYL,(2,2),RLSE),UNIT=SYSDA
//OUT   DD  DSN=PGM125.ENDDS.OUTPUT,
//          DISP=(NEW,CATLG,DELETE),
//          SPACE=(CYL,(2,2),RLSE),UNIT=SYSDA
//TOOLIN DD   *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN3) TO(T1) USING(CTL1)
COPY FROM(IN4) TO(T1) USING(CTL1)
COPY FROM(IN5) TO(T1) USING(CTL1)
SORT FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC FIELDS=(1,10)
/*
//CTL2CNTL DD *
  SORT FIELDS=(1,10,CH,A)
  SUM FIELDS=NONE
  OUTREC OVERLAY=(80:X)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Selecting One Field from Block of dataset..

Postby gokulNmf » Sun Jun 28, 2009 11:52 am

Thanks Dick and Frank, i was not aware :oops: that the DS with different length must'nt be concatenated :) ...
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 114
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post