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
 

 

Dynamic input allocation for JCL
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Dynamic input allocation for JCL
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

Moderator Team Head


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

PostPosted: Mon Apr 05, 2010 4:40 pm    Post subject: Reply to: Dynamic input allocation for JCL
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    Post subject: Reply to: Dynamic input allocation for JCL
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: 1445
Location: Azeroth

PostPosted: Mon Apr 05, 2010 5:38 pm    Post subject:
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    Post subject: Reply to: Dynamic input allocation for JCL
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    Post subject: Reply to: Dynamic input allocation for JCL
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: 8593
Location: Back in jolly old England

PostPosted: Wed Apr 07, 2010 4:24 pm    Post subject:
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: 1219
Location: Israel

PostPosted: Wed Apr 07, 2010 4:55 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Apr 07, 2010 8:03 pm    Post subject:
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: 1219
Location: Israel

PostPosted: Wed Apr 07, 2010 8:39 pm    Post subject: Re: Reply to: Dynamic input allocation for JCL
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    Post subject: Reply to: Dynamic input allocation for JCL
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 08, 2010 11:34 am    Post subject:
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    Post subject: Reply to: Dynamic input allocation for JCL
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 08, 2010 12:28 pm    Post subject:
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    Post subject: Reply to: Dynamic input allocation for JCL
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

Senior Member


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

PostPosted: Thu Apr 08, 2010 5:30 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 08, 2010 6:35 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Apr 08, 2010 7:27 pm    Post subject:
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: 7914
Location: Bellevue, IA

PostPosted: Thu Apr 08, 2010 7:39 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 08, 2010 8:02 pm    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 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 Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm


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