Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Creating 'N' number of files dynamically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sakthi16

New User


Joined: 12 May 2008
Posts: 13
Location: India

PostPosted: Thu Apr 14, 2011 2:27 am    Post subject: Creating 'N' number of files dynamically
Reply with quote

Hi,

I have requirement to read a single file and to create 'N' number of files based on field.

if a new fields comes today then i need to store it for future processing. how can i do this?

can anyone help me on this ?
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1060
Location: Oostende, Belgium

PostPosted: Thu Apr 14, 2011 2:30 am    Post subject:
Reply with quote

Write a Cobol, PL/I or REXX program and dynamically allocate the files.

You cannot do this with just JCL!
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Apr 14, 2011 2:56 am    Post subject: Reply to: Creating 'N' number of files dynamically
Reply with quote

Looks homework assignment to me...
Back to top
View user's profile Send private message
sakthi16

New User


Joined: 12 May 2008
Posts: 13
Location: India

PostPosted: Thu Apr 14, 2011 3:19 am    Post subject:
Reply with quote

Ya. We can not do this with just a JCL, can any one try to provide a best possible solution ?

Here the problem is Im handling a Variable length file.

the field mared in bold is the condition field.

For ex,

Input file


HDR
DSTART1AABBCCT5
DATA2BBCCRRR
DEND
DSTART1AABBCCT2
DATA2BBCCRRR
DEND
DSTART1AABBCCT5
DATA2BBCCRRR
DEND
DSTART1AABBCCT1
DATA2BBCCRRR
DEND
DSTART1AABBCCT2
DATA2BBCCRRR
DEND
LET


Output file

In this case we have three output files

first file

HDR1
DSTART1AABBCCT5
DATA2BBCCRRR
DEND
DSTART1AABBCCT5
DATA2BBCCRRR
DEND
LET

second file

HDR1
DSTART1AABBCCT2
DATA2BBCCRRR
DEND
DSTART1AABBCCT2
DATA2BBCCRRR
DEND
LET

third file

HDR1
DSTART1AABBCCT1
DATA2BBCCRRR
DEND
LET


but the condition field can have any value, we have to group the files using the condition field. and need to create 'N' number of output files based on this...

so, output files can be 1 or it can be many every day....

can any one help ?????
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Apr 14, 2011 3:50 am    Post subject: Reply to: Creating 'N' number of files dynamically
Reply with quote

This would be a good application for your sort tool (DFSORT or Syncsort - we obviously don't know which one you have). It could read your data, determine how many output DD's will be needed and maybe create a series of dynamic names and allocation statements, then format and arrange the data. Then, a set of proper DD and SORT statements could be written out and stored.

Then, your next job could use those details to perform the actual split.

Or, as already stated, you could do this programatically. A lot depends on what's acceptable to you and your shop and how you want to implement this.

There was a very similar topic posted here.
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 10 Tue Sep 05, 2017 4:24 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us