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
 

 

collecting file name which we are using in the program

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

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Thu Apr 03, 2008 12:19 am    Post subject: collecting file name which we are using in the program
Reply with quote

Hi all,

Is it possible to get the File name which are used in the program to another file.

//STEP EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=FILE.1
// DD DISP=SHR,DSN=FILE.2
// DD DISP=SHR,DSN=FILE.3
// DD DISP=SHR,DSN=FILE.4
// DD DISP=SHR,DSN=FILE.5
//SYSUT2 DD DISP=SHR,DSN=FILE.X

I want to get name of all files which are used in the SYSUT1 step to a new file.

Please explain me if the above scenario is possible.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 03, 2008 12:36 am    Post subject:
Reply with quote

Hello mahesh and welcome to the forums,


Quote:
I want to get name of all files which are used in the SYSUT1 step to a new file.
Please explain what this is asking.

Showing an example would probably help.
Back to top
View user's profile Send private message
maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Thu Apr 03, 2008 10:08 am    Post subject: hi
Reply with quote

Hi dick,

I have to insert all the files in to the table which are processed. So if we can copy the file names which are used in SYSUT1 to any fileX, i can write a cobol program which reads fileX and inserts a row in the table.

if you have any better suggestion please suggest me.
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 03, 2008 11:40 am    Post subject:
Reply with quote

Can I ask why this is a requirement ? What purpose does it serve ?
Back to top
View user's profile Send private message
maheshvamsi

New User


Joined: 22 Mar 2008
Posts: 39
Location: bangalore

PostPosted: Sat Apr 05, 2008 1:00 pm    Post subject: Reply to: collecting file name which we are using in the pro
Reply with quote

Hi,

sorry for late replay,

I AM WORKING IN SUPPORT, SOME TIME WE WILL GET 5 OR 6 FILES FOR PROCESSING ONE STREAM,

ONCE WE GET THESE FILES WE HAVE TO DO LOT OF MANUAL WORK, THE MAIN INTENSION OF ME IS TO REMOVE ALL THE MANUAL WORK WHICH WE ARE DOING.

I WILL EXPLAIN THE WORK BELOW.

1. ONCE WE GET ALL 5 FILES WE HAVE TO INSERT THESE FILES INTO ONE TABLE & THESE FILE ARE PICKED UP BY ONE OF OUR JOB STREAM(IT IS CONFIDENTIAL THAT'S WHY I AM NOT EXPLAINING FULLY)

2. WE HAVE TO CHECK ONE DATE PARAMETER MANUALLY IN ALL FIVE FILES

3. WE HAVE TO CHECK ONE parameter is SET to A OR C AS PER OUR REQUIREMENT.

4. ONE WE DID ALL THE THINGS IF WE FOUND ANY THING WRONG, WE HAVE TO GET BACK TO REQUESTOR FOR ASKING CORRECT INFORMATION.

THESE THINGS WILL TAKE NEARLY 50 MIN.

SO WHAT I AM PLANNING TO DO IS

WHEN WE GET REQUEST

1. I WILL COMBINE THEM TO ONE FILE BY USING IEBGENER

2. I WILL DISPLAY DIFFERENT DATES WHICH ARE USED IN THE DISPLAY FILED BY USING SORT (i GOT THIS INFORMATION IN THE SOME TOPICS WHICH ARE DIsCUSSED IN THE FORUM) -- WHICH WILL SATISFY ABOVE REQUIREMENT 2

3. FOR REQUIREMENT 3 I WILL USE SAME AS ABOVE

4. FOR FUFILLING FIRST REQUIREMENT I AM FACING SOME PROBLEM. IF WE GET ALL THE FILES IN TO ONE DATASET, BY USING COBOL PROGRAM I CAN WRITE IT INTO THE TABLES(U CAN SUGGEST ME IF ANY OTHER EASY WAY ALSO)

IF THERE IS ANY OTHER EASY WAY ALSO U CAN SUGGEST ME .

THANKS IN ADVANCE.
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Sat Apr 05, 2008 4:36 pm    Post subject: Reply to: collecting file name which we are using in the pro
Reply with quote

mahesh,

As your intention is to reduce the manual effort in getting the DD names, i would go for REXX for this requirement.

Store this JCL in a file and read it into a stem variable using DISKR command.
Then search the stem for SYSUT1 and move the file name to a QUEUE. DO this until you find SYSUT2.

Finally write the QUEUE into a file which would have all the file names.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sat Apr 05, 2008 6:26 pm    Post subject: Reply to: collecting file name which we are using in the pro
Reply with quote

why not go the other way around...
instead of retrieving the file names from the jcl,
build the jcl dynamically
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Apr 05, 2008 8:12 pm    Post subject:
Reply with quote

Another possible approach:

From SDSF, XDC the JCL to a file (PS or PDS - don't use SJ if the DDs can contain symbolics. BTW, the symbolics may affect Aaru's solution too), then edit the file to produce the desired table.
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Sat Apr 05, 2008 8:18 pm    Post subject: Reply to: collecting file name which we are using in the pro
Reply with quote

mmwife,

Yep, you are correct.

mahesh,

If your JCL has got symbolics then u can use SDSF in batch to get the filenames (you can use SDSF in batch to copy the contents of any DD) and then add logic in REXX to get the list of the input files.
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 IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
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
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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