Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
opening a dataset after reading it from another data set

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
arunsoods

New User


Joined: 13 Jul 2016
Posts: 35
Location: India

PostPosted: Wed Oct 04, 2017 3:54 pm    Post subject: opening a dataset after reading it from another data set
Reply with quote

Hi Team,

I required to read a data set from another data set for which I donot have any idea how can I achieve please let me know if it is possible or not.

Code:

G7D208MM G7UBB.ACCT.DD.FILE.IN(0)                                  08 
G7D207MM G7UBB.HIERCHY.DD.FILE.IN(0)                               08 
G7D403MM G7UBB.PRDP.LOANPERF.FILE.IN(0)                            08 
G7D200MM G7UBB.LB.MGT.FILE.IN(0)                                   16 


In above file I have jobName(G7208MM) FileName(G7UBB.ACCT.DD.FILE.IN(0)) and location(08) from where I want to pick the sequence number. The sequence number is of 4 byte & is at trailer of the file & at above mentioned byte location.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1932
Location: UK

PostPosted: Wed Oct 04, 2017 4:09 pm    Post subject:
Reply with quote

You need 2 jobs - the first to read your data set containg data set names, select the data set required and generate the second job to process that data set.

Or, with the programming language of your choice, do it in one step using dynamic allocation.
Back to top
View user's profile Send private message
arunsoods

New User


Joined: 13 Jul 2016
Posts: 35
Location: India

PostPosted: Thu Oct 05, 2017 1:10 pm    Post subject:
Reply with quote

Thanks Nic do we need to generate a job for each data set..?
Do you have any sample code that do the similar task..?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1932
Location: UK

PostPosted: Thu Oct 05, 2017 4:08 pm    Post subject:
Reply with quote

Quote:
do we need to generate a job for each data set

Without knowing your full requirements how would anyone know?

Quote:
Do you have any sample code that do the similar task..?

Plenty of examples around on this, and other forums.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 233
Location: Maryland

PostPosted: Thu Oct 05, 2017 7:36 pm    Post subject: Re: opening a dataset after reading it from another data set
Reply with quote

arunsoods wrote:
I required to read a data set from another data set for which I donot have any idea how can I achieve

Hum-m-m...
Does anyone have an idea about reading a dataset from another dataset??? icon_question.gif icon_cry.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Oct 05, 2017 8:39 pm    Post subject: Reply to: opening a dataset after reading it from another data set
Reply with quote

Quote:
Do you have any sample code that do the similar task..?
This is a forum for experts -- as in people who can either use the Internet to find what they need or know how to write code without needing sample code. Asking for code on this forum, you should be prepared to pay professional rates for the code -- $500 to $2000 per day of coding are typical rates here. Perhaps you would be better off on Beginners and Students Forum instead of this forum? The code to use BPXWDYN for dynamic allocation has been posted multiple times and is pretty straightforward code. It is maybe 100 lines of COBOL (depending upon how complex you want to get), and less in other languages.

Furthermore, what will you do once you've found the sequence number? Use it in a program? Use it as a JCL parameter? Write it to another data set?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us