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
 

 

Splitting One File into Multiple GDG versions dynamically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Splitting One File into Multiple GDG versions dynamically
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: 8593
Location: Back in jolly old England

PostPosted: Fri Oct 29, 2010 12:41 pm    Post subject:
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    Post subject:
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: 2158
Location: @my desk

PostPosted: Fri Oct 29, 2010 1:56 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Oct 29, 2010 4:02 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Fri Oct 29, 2010 4:23 pm    Post subject:
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: 2158
Location: @my desk

PostPosted: Fri Oct 29, 2010 4:25 pm    Post subject:
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 http://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    Post subject:
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    Post subject:
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: 2158
Location: @my desk

PostPosted: Mon Nov 01, 2010 10:50 am    Post subject:
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    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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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