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

File Naming


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

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Fri Apr 13, 2012 2:19 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 13, 2012 2:25 pm
Reply with quote

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
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Fri Apr 13, 2012 2:32 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Apr 13, 2012 2:34 pm
Reply with quote

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
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Fri Apr 13, 2012 2:43 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 13, 2012 2:48 pm
Reply with quote

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
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Fri Apr 13, 2012 2:58 pm
Reply with quote

I believe there could be a maximum of 100 or 200 o/p data sets only.
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 Apr 13, 2012 3:06 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 13, 2012 3:07 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Apr 13, 2012 3:37 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Apr 13, 2012 3:50 pm
Reply with quote

Good point. Better to find out now(ish) rather than another 30 posts down the track.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Apr 13, 2012 7:30 pm
Reply with quote

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
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top