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

Dynamic input allocation for JCL


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

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Mon Apr 05, 2010 4:35 pm
Reply with quote

Hello

I have a requirement and it is as follows:

I receive 'N' number of files everyday and at the end of the day I need to concatenate them into one file and need to update the DB2. The file format would be like, PRD.FILE.xxxx.FTP.DATA. Where xxxx would be vendor code. We have around 1000 vendors. But daily I get only a few vendor files for processing. Like

PRD.FILE.ven1.FTP.DATA
PRD.FILE.ven2.FTP.DATA...... may be 10 or 20 or 30 files a day. But that number is not known and vendor also not known.

Can anybody help, how can I pickup the available files for the day for processing in my JCL?

Thanks in advance
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Apr 05, 2010 4:40 pm
Reply with quote

Use the same method shown here in this previous topic.
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Mon Apr 05, 2010 5:23 pm
Reply with quote

Hello Kevin

Thanks for your suggestion. I have looked into the topic mentioned by you. But it is related to GDG and we know the file name. But in my case its a flat file and each file name is different. Do you think that this works with LISTCAT?

Thanks & Regards
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Apr 05, 2010 5:38 pm
Reply with quote

Hi,

The IDCAMS LISTCAT works for flatfiles as well.
Remove the GDG keyword alone on the LISTCAT statement.
Quote:
But in my case its a flat file and each file name is different.

try this command,
LISTCAT ENT('PRD.FILE.*.FTP.DATA') ALL


As shown on the thread by Kevin,
You will have to edit the SORT cards to filter out the dataset names alone created for the current day.

hope this helps icon_smile.gif
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Tue Apr 06, 2010 10:01 am
Reply with quote

Hello Vasanth & Kevin

Thanks a lot for your help. It works fine.
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Wed Apr 07, 2010 4:21 pm
Reply with quote

Hello

Again, using LISTCAT ENT, I am getting all the datasets, but also other statistics. If I want to have only the name of the datasets without any other information, is is possible? Do we have any option with LISTCAT?

Thanks in advance
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 07, 2010 4:24 pm
Reply with quote

At least post what your control statements look like, and also the output.
Please also post the output you require.

Have you bothered to read the IDCAMS manual to see if the various options might help you.
What else have you tried for yourself, possibly adapting the sort include / omit criteria.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Apr 07, 2010 4:55 pm
Reply with quote

Just remove the "ALL" parameter!

Use your free time to click on "IBM Manuals" on top of this page, scroll down to "Tools & Data Access methods" section,
and click on VSAM Services for DFSMS link.
Chapter 27 explains all the parameters for LISTCAT
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 07, 2010 8:03 pm
Reply with quote

Hi Marso,

Methinks that the OP gets the info he wants but not in the correct format, hence my comment relating to the linked thread suggesting a play with the sort control statements.

I know it can be done easily as I have done this myself a couple of times.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Apr 07, 2010 8:39 pm
Reply with quote

kudamala wrote:
I receive 'N' number of files everyday and at the end of the day I need to concatenate them into one file

kudamala wrote:
Again, using LISTCAT ENT, I am getting all the datasets, but also other statistics. If I want to have only the name of the datasets without any other information, is is possible? Do we have any option with LISTCAT?


Even without the ALL parameter, some cleanup will be necessary:
Code:
TSO LISTC ENT('HLQ.*.COBOL)
NONVSAM ------- HLQ.TST1.COBOL
     IN-CAT --- CATALOG.USER.PROD0000
NONVSAM ------- HLQ.TST2.COBOL
     IN-CAT --- CATALOG.USER.PROD0000
NONVSAM ------- HLQ.PROD.COBOL
     IN-CAT --- CATALOG.USER.PROD0000


Supposing that you have successfully collected a list of dataset names, how do you plan to concatenate them ???
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Apr 08, 2010 11:29 am
Reply with quote

Hi

Yes, what you said is correct. We need some clean up. I tried to sort using outrec, but I couldn't succeed. Can anybody provide correct sort code to copy only dataset names to output file from the above file?

Thanks in advance
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 08, 2010 11:34 am
Reply with quote

Please provide your sort code and we will try to help you.
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Apr 08, 2010 12:24 pm
Reply with quote

Hello

Here is what I use.

//SORTIN DD DSN=DEV.EUM.SELL.LIST.DATA0,DISP=SHR
//SORTOUT DD DSN=DEV.EUM.SELL.LIST.DATA,DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(150,150),RLSE),
// RECFM=VB,
// LRECL=125

Sort card:

SORT FIELDS=COPY
OUTREC FIELDS=(5:23,40)

Input data:

=COLS> ----+----1----+----2----+----3----+----4----+--
****** ***************************** Top of Data *****
000001 0NONVSAM ------- DEV.EUM.MKT.SELL.ABCD.FTP.DATA
000002 0NONVSAM ------- DEV.EUM.MKT.SELL.ALCK.FTP.DATA
000003 0NONVSAM ------- DEV.EUM.MKT.SELL.BCDA.FTP.DATA
000004 0NONVSAM ------- DEV.EUM.MKT.SELL.ARPD.FTP.DATA


Error:
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT
ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND

Both input and output files are in VB format. What I need is to copy only file names from input to out.

thanks in advance
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 08, 2010 12:28 pm
Reply with quote

This is what works for me, getting the output into an FB 80 dataset
Also, I do not try and override the DCB parameters from the LISTCAT, I let it use VBA, 125
Code:
//SORTOUT  DD DSN=Data Set Name,DISP=(,CATLG,DELETE),     
//            RECFM=FB,LRECL=80,SPACE=(TRK,(3,3),RLSE) 
//SYSIN    DD *                                         
  SORT     FIELDS=COPY                                 
  OUTFIL   INCLUDE=(6,7,CH,EQ,C'NONVSAM'),             
           OUTREC=(22,44,80:X),VTOF     
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Apr 08, 2010 12:52 pm
Reply with quote

Thank you all icon_razz.gif
It works with the above parameters.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Apr 08, 2010 5:30 pm
Reply with quote

For such an exercise I usually prefer using (gives rather neat output):
Code:
//STEP01  EXEC PGM=IKJEFT1A                       
//SYSPROC   DD DSN=SYS1.SAMPLIB,DISP=SHR         
//SYSTSPRT  DD DSN=XXXXXX.LIST.HLQ,               
//             DISP=(NEW,CATLG,CATLG),           
//             UNIT=??,SPACE=??,
//             DCB=(RECFM=FB,LRECL=133,BLKSIZE=0)
//SYSTSIN   DD *                                 
%IGGCSIRX                                         
HLQ.**                                           
/*                                                 
Though I just figured it out, it does not work for search-argument of type "HLQ.**.LLQ" but it works for "HLQ.S**.LLQ" where "S" can be replaced by your choice.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 08, 2010 6:35 pm
Reply with quote

Huh, it certainly works for me.
What results are you getting. My CSI utility works fine with HLQ.**.LLQ

Of course it may be my interpretation of what you are saying Anuj, as it has been one of THOSE DAYS.
Is it legal to shoot users ?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Apr 08, 2010 7:27 pm
Reply with quote

ah..My observation sucks - take my words back icon_redface.gif . Why the hell do I work on Thrusday and now idiots have asked me to give support on coming Sunday while for that day my ex is waiting to meet Her on Her B'day ... my timing stinks!Yuck!

Quote:
Is it legal to shoot users ?
Sorry but 'm lost here, expat.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 08, 2010 7:39 pm
Reply with quote

expat wrote:
Is it legal to shoot users ?
Only when they are in season, expat.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 08, 2010 8:02 pm
Reply with quote

Anuj Dhawan wrote:
Quote:
Is it legal to shoot users ?
Sorry but 'm lost here, expat.

What I was saying here, and you must have had the experience, is when your users do things so stupid that you feel they are so dense that light bends toward them, so I was just asking if it was legal to shoot the users so I don't have to sort out their stupid problems. Just to put your mind at ease here, I WAS NOT referring to you ....... no really, honestly icon_lol.gif I mean it icon_lol.gif

Robert, When does user season open up
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 08, 2010 8:04 pm
Reply with quote

expat, some days I think the season should be year-round .....
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 09, 2010 6:27 pm
Reply with quote

LOL - expat, you know this kid now quite well... icon_lol.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Apr 12, 2010 2:56 pm
Reply with quote

Anuj Dhawan wrote:
LOL - expat, you know this kid now quite well... icon_lol.gif
And if you ever come to Brussels the first beer (or nine) is on me icon_cool.gif
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts force tablespace using LISTDEF input DB2 1
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
Search our Forums:

Back to Top