View previous topic :: View next topic
|
Author |
Message |
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Hi All,
I need to split files with naming convention as below:
<Begin Date>_<End Date>.txtnn
where nn=aa,ab,ac.... zz
Is there anyway we can achieve this? Any help would be appreciated. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Your file-name is not a mainframe name. Explain how the mainframe gets involved, please.
What do you mean by "splitting" the files? |
|
Back to top |
|
|
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Hi Bill,
From a huge input file i need to split those files into different parts according to a flag and ftp those files to a different system using the naming convention above.
Sorry for providing incorrect info at the onset. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
File names are usually of type: HLQ.SLQ.LLQ. Where H, S and L stands for High, Second and Low respectively & "LQ" is "Level Qualifier". JCL does not allow "_".
I must have misunderstood. Please show us an example in which you show what input you have (contents of input) and what output do you want out of it and using what - SORT, REXX, ISPF or something else. |
|
Back to top |
|
|
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Making it simple
File name : T345.INPUT.ACC.FILE
I/P
-------
11111
22222
33333
I want the output file to be:
file name : T345.INPUT.ACC.FILEAA
o/p
----
11111
file name : T345.INPUT.ACC.FILEAB
o/p
----
22222
file name : T345.INPUT.ACC.FILEAC
o/p
----
33333
The records in the input file is not static. Can this be done using JCL, REXX?. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
So, you have a key, and you want a seperate dataset for each key, with the dataset having a LLQ from AA and going up through the alphabet?
JCL doesn't do stuff. Programs executed by JCL do.
Is there some limit to the number of keys (and therefore output datasets)? |
|
Back to top |
|
|
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
I believe there could be a maximum of 100 or 200 o/p data sets only. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
My Girl is a Dentist, I'll ask her to have a look at this thread and tell I can also do what you do at your clinic even being from an Engineering back-ground! |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK. "huge" kind of rules out rexx. What Sort product do you have?
What about the FTP stuff itself? You going to do that manually, or you want that automated? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Bill Woodger wrote: |
OK. "huge" kind of rules out rexx. |
I think that we need a more quantitative description that "huge". ISTR querents breathlessly describing as "huge" data sets that were several megabytes in size. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Good point. Better to find out now(ish) rather than another 30 posts down the track. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
If it were me, I would do it in two phases:
Create a first pass to split into ranges - like anything starting with a, anything starting with b. The output would be 26 files.
Then for each of THOSE files, split them again into 26 files - like aa, ab , ac.
That way, you could have two jobs set up, one to do the first split that never changes. The other would call a proc with the input file name and output first character as a symbolic. |
|
Back to top |
|
|
|