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
 

 

How to find a Input file dynamically.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Aug 28, 2008 3:42 pm    Post subject: How to find a Input file dynamically.
Reply with quote

Hello all,

I need to find out the output file dynamically. If we search one file in 3.4 , then we provide with P.XXXX.* - it will display the cominations.

please check my sample code

Code:

//TSOXXXX4 JOB (12345),'JCL',CLASS=E,                   
//           MSGCLASS=X,NOTIFY=&SYSUID,                 
//           MSGLEVEL=(1,1)                             
//*                                                     
//*                                                     
//R010     EXEC PGM=SORT,COND=(0,NE)                     
//SORTIN   DD  DSN=TSOXXXX.ADV124DP.HISTORY.V*,         
//             DISP=SHR                                 
//SORTOUT  DD  DSN=TSOXXXX.DEV1.JCLGEN.JOBLIB(ADV124DP),
//             DISP=SHR                                 
//SYSIN    DD  DSN=TSOXXXX.PAS.CNTL.DEC07(ADV124DP),     
//             DISP=SHR                                 
//SYSOUT   DD  SYSOUT=*                                 
//*                                                     


The actual file is TSOXXXX.ADV124DP.HISTORY.V6767. I'm giving that with TSOXXXX.ADV124DP.HISTORY.V*, "*" symbol. It is showing JCL error is there any other way to search a file dynamically and use the same as Input.
Kindly post ur reply
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Aug 28, 2008 3:59 pm    Post subject: Reply to: How to find a Input file dynamically.
Reply with quote

vasu,

Quote:
I'm giving that with TSOXXXX.ADV124DP.HISTORY.V*, "*" symbol. It is showing JCL error


Yes, it will as this is not a valid syntax.

Quote:
there any other way to search a file dynamically and use the same as Input.


I would go for REXX, using LISTDSI and then creating the JCL with the input files.
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Aug 28, 2008 4:02 pm    Post subject: Re: Reply to: How to find a Input file dynamically.
Reply with quote

Aaru wrote:
I would go for REXX, using LISTDSI and then creating the JCL with the input files.


okay Thank you. Do u ve any sample for this ? Else let me try this in REXX. Thanks again
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Aug 28, 2008 4:06 pm    Post subject: Reply to: How to find a Input file dynamically.
Reply with quote

vasu,

Quote:
okay Thank you. Do u ve any sample for this ?


Search the REXX forum. I Shall post if i find anything.
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Aug 28, 2008 5:13 pm    Post subject: Re: Reply to: How to find a Input file dynamically.
Reply with quote

This is a online REXX job to find datasets

Code:


 /*REXX*/                               
 FILE_NAME="T.PAS.ACCSERST.PHASE3.D*"   
 "LISTCAT ENTRIES('"FILE_NAME"')"   

Output
---------
T.PAS.ACCSERST.PHASE3.D060108
T.PAS.ACCSERST.PHASE3.D070508

 
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 Aug 28, 2008 5:27 pm    Post subject:
Reply with quote

Take a look at SYS1.SAMPLIB (IGGCSIRX) for a great way to do this.

You can use wild cards almost as easily as you can with 3.4
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Thu Aug 28, 2008 7:26 pm    Post subject: Re: Reply to: How to find a Input file dynamically.
Reply with quote

This LISTCAT command not fetching up the PS file Entries. I tried its showing Error icon_sad.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Aug 29, 2008 11:11 am    Post subject: Reply to: How to find a Input file dynamically.
Reply with quote

Vasu,

Searched a found a topic where i had posted a code for expanding the datasets when given with a wildcard. I really dont know whether that was useful to the OP. But you can give it a try. I had provided just the logic and not the entire code.


http://ibmmainframes.com/viewtopic.php?t=29915&highlight=listid
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Fri Aug 29, 2008 12:13 pm    Post subject: Re: Reply to: How to find a Input file dynamically.
Reply with quote

Hello Aaru,
I tried ur link. The logic s really useful for my further process.
tried some xmple nd its working fine . Thnx million icon_smile.gif .
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Aug 29, 2008 1:58 pm    Post subject: Reply to: How to find a Input file dynamically.
Reply with quote

Vasu,

Quote:
tried some xmple nd its working fine .


That's great.

Quote:
Thnx million


You are welc icon_biggrin.gif me.
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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