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

Creating a GDG through SORT


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

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Mon Nov 27, 2006 11:02 am
Reply with quote

hi
i have to write a jcl which will create gdg bases in the following way:
1. in step1 i wrote sort program in which SORTIN datasets contains
gdg base names. In SYSIN DD * i wrote
//SYSIN DD *
SORT FIELDS=(1,16,CH,A)
RECORD TYPE=F,LENGTH=80
OUTREC FIELDS=(C' DEFINE GDG(NAME(',1,16,C') LIMIT(3) SCRATCH NOEMPTY)')
/*
2. in step2 i used dataset in SORTOUT of step1 as SYSIN DD * input.

This works fine if data in the SORTOUT is limited to 80 fields.
But when the length of data in the SORTIN (gdg base names) is incresed then step2 will not execute the commnds.

how can i tackle with this problem?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Nov 27, 2006 3:17 pm
Reply with quote

Hi !

Could you please explain me, why you are using sort.
Creating GDG you should normaly use IDCAMS.

Sorry, I don't understand your problem.

Regards, UmeySan
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Nov 27, 2006 3:25 pm
Reply with quote

HI sudhakar_lendave,

In that case u have to increase the length of o/p file to occupy gdg base name more that 80 bytes.
UmeySan: he want to create jcl for creating GDG base.He will create the jcl using sort
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Nov 27, 2006 10:20 pm
Reply with quote

It appears you're trying to use DFSORT to create IDCAMS control statements like this:

Code:

 DEFINE GDG(NAME(dsname) LIMIT(3) SCRATCH NOEMPTY)


DFSORT has no problem creating such control statements beyond 80 characters, but IDCAMS probably can't read a control statement that long. So you'd need to create continued control statements that IDCAMS can read like this:

Code:

 DEFINE GDG(NAME(dsname) -
     LIMIT(3) SCRATCH NOEMPTY)


You can use these DFSORT control statements to do that:

Code:

  SORT FIELDS=(1,44,CH,A)                             
  OUTREC FIELDS=(C' DEFINE GDG(NAME(',1,44,C') -',/,   
    C'   LIMIT(3) SCRATCH NOEMPTY)')                   
Back to top
View user's profile Send private message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Mon Dec 04, 2006 11:06 am
Reply with quote

hi frank,
it is giving following problem to your solution,
Code:
 SYSIN :                                                         
   SORT FIELDS=(1,44,CH,A)                                       
   OUTREC FIELDS=(C' DEFINE GDG(NAME(',1,44,C') -',/,             
                                                   *             
   C' LIMIT(3) SCRATCH NOEMPTY)')                                 
 WER268A  OUTREC STATEMENT  : SYNTAX ERROR                       
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Dec 04, 2006 10:53 pm
Reply with quote

My mistake. I should have shown an OUTFIL statement rather than an OUTREC statement since only OUTFIL can use /.

Code:

  OUTFIL BUILD=(C' DEFINE GDG(NAME(',1,44,C') -',/,   
    C'   LIMIT(3) SCRATCH NOEMPTY)')                   


However, the WER messages indicate you're using Syncsort, not DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top