Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 2224
Location: Hampshire, 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: 2224
Location: Hampshire, 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 Member


Joined: 29 Apr 2008
Posts: 542
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: 8479
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 Organization of a migrated dataset saravanakmr.tpr All Other Mainframe Topics 2 Fri Sep 20, 2019 6:10 pm
No new posts How to force ISPF to allocate ISPF te... Michele Giannuli TSO/ISPF 9 Thu Sep 12, 2019 2:03 pm
No new posts Need to fetch data from database base... Satandale COBOL Programming 8 Sun Sep 08, 2019 12:01 am
No new posts How to append data from PARM in OUTFIL Poha Eater DFSORT/ICETOOL 17 Thu Aug 22, 2019 4:03 pm
No new posts TSO TEST writing to dataset Harold Barnes IBM Tools 3 Sat Aug 03, 2019 3:02 am

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