View previous topic :: View next topic
|
Author |
Message |
Satandale
New User
Joined: 07 Sep 2019 Posts: 2 Location: India
|
|
|
|
Hello,
I want to read certain data from database base on the flags in input file which contains data like NYYYN...... UPTO 12 TIMES.
Second file which contains number of records with keys. Based upon on these keys retrieving data from database which can contain multiple entries for single or multiple members which satisfy the flag indicators values.
Then want to write these data into second file from position 1276 onwards iteratively for these 12 flag indicators. Here all flag entries contains value of 150 bytes.
Can some one please advise how it can be achieved. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Your explanation is not at all clear to me. Perhaps you could provide some sample inputs and outputs.
Really, you should try first and then ask questions regarding specific problems you have with your code. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
Nic Clouston wrote: |
Your explanation is not at all clear to me. Perhaps you could provide some sample inputs and outputs. |
You mean it's as clear as mud. What the fecking 'ell is this (self-censored) doing on a forum for experts??? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Quote: |
Can some one please advise how it can be achieved? |
Write a Cobol-Db2 program, that’s the best solution based on the complex info provided.
If you need better answers then explain the requirements in much simpler way that anyone can understand without making no assumptions. |
|
Back to top |
|
|
Satandale
New User
Joined: 07 Sep 2019 Posts: 2 Location: India
|
|
|
|
Missed to add the information about the input and output.
Input:
Input is retrieved from database
I'd. First. Last. COB. Effective. Userid
Name. Name. Indc. Date
123456789 Alexa Martin Cs. 2019-01-01. Abc
123456789 Alexa. Martin. Cp. 2019-03-01. Xyz
123456789 Alexa. Martin. Ms. 2019-02-01. Xyz
234567891 Roti. Senti. Mp. 2019-01-01. Abc
Output:
Want to write in PS dataset as like below:
123456789 Alexa Martin Cs. 2019-01-01. Abc. Cp. 2019-03-01. Xyz. Ms. 2019-02-01. Xyz
234567891 Roti. Senti. Mp. 2019-01-01. Abc
Please be advise on this.
If anything missing please let me know.
Thanks,
Satandale |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Satandale wrote: |
Missed to add the information about the input and output.
Input:
Input is retrieved from database
I'd. First. Last. COB. Effective. Userid
Name. Name. Indc. Date
Code: |
123456789 Alexa Martin Cs. 2019-01-01. Abc
123456789 Alexa. Martin. Cp. 2019-03-01. Xyz
123456789 Alexa. Martin. Ms. 2019-02-01. Xyz
234567891 Roti. Senti. Mp. 2019-01-01. Abc
|
Output:
Want to write in PS dataset as like below:
Code: |
123456789 Alexa Martin Cs. 2019-01-01. Abc. Cp. 2019-03-01. Xyz. Ms. 2019-02-01. Xyz
234567891 Roti. Senti. Mp. 2019-01-01. Abc
|
Please be advise on this.
If anything missing please let me know. |
0) Did you ever hear/see so called "code tags"?
1) How all above is related to the original?
Quote: |
the flags in input file which contains data like NYYYN...... UPTO 12 TIMES. |
2) Can this output "string"/"record"/"row" be of unlimited size??? Do you plan to print it on paper of unlimited width? What is the planned use of this endless line? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Rohit Umarjikar wrote: |
Write a Cobol-Db2 program, that’s the best solution based on the complex info provided. |
This statement is under a very big question. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
sergeyken wrote: |
Rohit Umarjikar wrote: |
Write a Cobol-Db2 program, that’s the best solution based on the complex info provided. |
This statement is under a very big question. |
Its is not based on what TS had said in the original post.
Quote: |
I want to read certain data from database base on the flags in input file which contains data like NYYYN...... UPTO 12 TIMES. |
Let me save time and future locking of this another post because of the arguments that you put in, If you have any questions about what I say then PM me. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
This topic is under "COBOL Programming" so obviousy a COBOL program is required. What has not been specified is the DBRM. It could be DB2 but it might be IMS and yet again it could be IDMS. Those are the most common - others may be available! May the OP (topic starter) inform us of the DBRM in use? |
|
Back to top |
|
|
|