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

Splitting One File into Multiple GDG versions dynamically


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

New User


Joined: 14 Mar 2009
Posts: 6
Location: Hyderabad

PostPosted: Fri Oct 29, 2010 12:37 pm
Reply with quote

Hello,

I have a fixed block Input file of length 250.

My requirement is to write all these records in an O/P GDG (FB,250), but each version should have only 20,000 records.
If it crosses 20,000 I should write into the next version of GDG.

I need to do it dynamically based on the number of Input records.

I am wondering how to achieve this in DFSORT.

Thanks !
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Oct 29, 2010 12:41 pm
Reply with quote

When talking about GDS it is important to use the correct terminology, as both version and generation are both valid in terms of a GDS.

It is a well known fact that only one version of a GDS may exist at any one time, however, multiple generations may exist together.

Please learn and use the correct terminology when posting, as using the wrong term can cause confusion and possibly delay a resolution to your problem.

Also, looking back on your previous posts you appear to be using both SYNCSORT and DFSORT in the titles of your posts. Can you please clarify EXACTLY which product that you are using by running the code below and posting the full output from the JES SYSOUT element.
Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY

Again, with your previous postings, you start a thread and have never once returned to that thread to give the forum an update about the status of your problem. Please make the effort to do so in future.

This request also includes providing answers to questions asked, as in a previous post, December 2009, I have asked for exactly the same information, but unfortunately just like Diana Ross, "I'm still waiting".
Back to top
View user's profile Send private message
rupali_shah
Warnings : 1

New User


Joined: 14 Mar 2009
Posts: 6
Location: Hyderabad

PostPosted: Fri Oct 29, 2010 1:55 pm
Reply with quote

Hello,

Sorry for not coming back to the previous posts. I will take care of that in future.

Regarding the exact product, here is my JES SYSOUT for the code you gave:


Code:
SYNCSORT FOR Z/OS  1.3.2.2R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSOR
                                 The Company that I am working with    z/OS   1.1
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 99999, MODEL 99999 999             LICENS
SYSIN :                                                                         
  SORT FIELDS=COPY                                                             
WER276B  SYSDIAG= 264902, 570660, 570660, 1067700                               
WER164B  5,872K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     48K BYTES RESERVE REQUESTED, 272K BYTES USED                       
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                                 
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                   
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                   
WER410B  4,844K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,       
WER410B     0 BYTES RESERVE REQUESTED, 156K BYTES USED                         
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                   
WER416B  BSAM WAS USED FOR SORTIN                                               
WER416B  BSAM WAS USED FOR SORTOUT                                             
WER054I  RCD IN          1, OUT          1                                     

WER169I  RELEASE 1.3 BATCH 0513 TPF LEVEL 2.2                                   
WER052I  END SYNCSORT - RS648IC,SORTSTEP,,DIAG=E000,6244,C824,0044,A8DA,4DCA,0A2


I meant generations when i said I want o/p to be splitted.
Sorry for the confusion.

Thanks.

CPU details and company name have been edited out
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Oct 29, 2010 1:56 pm
Reply with quote

Quote:
"I'm still waiting".
for the next reply in 2011? icon_lol.gif

***Edited*** Oops I got beaten by a minute.

Rupali,

It is not advisable to display the CPU details in a public forum
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Oct 29, 2010 4:02 pm
Reply with quote

Quote:
I am wondering how to achieve this in DFSORT.
You must be knowing by now, You're using SyncSort not DFsort.

There are many ways to achive what you want, one way is:
Code:
SORT FIELDS= COPY
OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLIT1R=20000
and OUT1 etc. will be like your.gdg(+1)...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 29, 2010 4:12 pm
Reply with quote

can you generate 2 generations of the same gdg in one step?

outfile1 dd dsn=my.gdg(+1), disp...
outfile2 dd dsn=my.gdg(+2), disp...
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Oct 29, 2010 4:23 pm
Reply with quote

Oh Dick, you make me to post in even when I'm just getting ready to fly back to my sweet Home:

This JCL
Code:
//S2      EXEC  PGM=SORT                         
//SYSOUT  DD   SYSOUT=*                           
//SORTIN  DD *                                   
1                                                 
2                                                 
3                                                 
4                                                 
//OUT1 DD DSN=HLQ.FIRST.GDG(+1),                 
//             DISP=(,CATLG,DELETE),             
//             UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE),
//             DCB=(BLKSIZE=0)                   
//OUT2 DD DSN=HLQ.FIRST.GDG(+2),                 
//             DISP=(,CATLG,DELETE),             
//             UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE),
//             DCB=(BLKSIZE=0)                   
//SYSIN   DD *                                   
  OPTION COPY                                     
  OUTFIL FNAMES=(OUT1,OUT2),SPLIT1R=2             
/*                                               
//*                                               
will give

Code:
HLQ.FIRST.GDG.G0001V00 
HLQ.FIRST.GDG.G0002V00 
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Oct 29, 2010 4:25 pm
Reply with quote

Quote:
can you generate 2 generations of the same gdg in one step?
It works for me (as well)

Anuj,

The OP needs to do it dynamically based on the number of input records. I feel that requires either a JCL created on the fly based on the input record count or some REXX code and not just a SORT split.

Rupali,

If you have an option to submit the job through INTRDR, you may modify JCL available in ibmmainframes.com/viewtopic.php?t=34987 to achieve this
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 29, 2010 5:03 pm
Reply with quote

Anuj, Arun,
thx to both for the clarification.
some things I know, others I learn on an as-needed-basis.
Back to top
View user's profile Send private message
rupali_shah
Warnings : 1

New User


Joined: 14 Mar 2009
Posts: 6
Location: Hyderabad

PostPosted: Sun Oct 31, 2010 11:41 pm
Reply with quote

Thanks a bunch Arun.
The link u have given perfectly matches my requirement.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 01, 2010 10:50 am
Reply with quote

You're welcome icon_smile.gif
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top