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
 

 

Creating a GDG through SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Creating a GDG through SORT
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: 757
Location: Germany

PostPosted: Mon Nov 27, 2006 3:17 pm    Post subject: Re: Creating a GDG through SORT
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: 1187
Location: Bangalore,India

PostPosted: Mon Nov 27, 2006 3:25 pm    Post subject:
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 Moderator


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

PostPosted: Mon Nov 27, 2006 10:20 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Mon Dec 04, 2006 10:53 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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