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

How to find a Input file dynamically.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1287
Location: Chennai, India

PostPosted: Thu Aug 28, 2008 3:59 pm
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
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: 1287
Location: Chennai, India

PostPosted: Thu Aug 28, 2008 4:06 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Aug 28, 2008 5:27 pm
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
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: 1287
Location: Chennai, India

PostPosted: Fri Aug 29, 2008 11:11 am
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
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: 1287
Location: Chennai, India

PostPosted: Fri Aug 29, 2008 1:58 pm
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 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 10
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