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 '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

Active Member


Joined: 07 Feb 2009
Posts: 989
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: 4648
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm


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