View previous topic :: View next topic
|
Author |
Message |
arunc55
New User
Joined: 15 Nov 2017 Posts: 2 Location: India
|
|
|
|
Hi All,
I'm working on a program to fetch the content of data from a PS file by giving the input as start field and end filed.
For example:
It consist of three input files
Input 01 is PS file contains the data
Code: |
15 ALPHABET-($).
17 ABC-($) PIC 9(3).
17 DEF-($) PIC 9(3).
17 GHIJK-($) PIC 9(5).
17 LMNO-($) PIC 9(4).
17 PQRSTU-($) PIC 9(6).
17 VWXYZ-($) PIC S9(5) COMP-3. |
Input 02 will be passed through JCL and it's group name ALPHABET-($)
Input 03 will be passed through JCL and it's variable name LMNO-($)
The desired output is:
Code: |
15 ALPHABET-($).
17 ABC-($) PIC 9(3).
17 DEF-($) PIC 9(3).
17 GHIJK-($) PIC 9(5).
17 LMNO-($) PIC 9(4). |
Can someone please help me out to solve this through a sample cobol. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Nope.
What do you mean by
Quote: |
passed through JCL |
? What JCL? What programs is the JCL executing?
Your progam input is a data structure and your desired output is the same data structure, left-shifted and a couple of the fields removed? So what are the other 2 data sets (they are not 'files')? |
|
Back to top |
|
|
arunc55
New User
Joined: 15 Nov 2017 Posts: 2 Location: India
|
|
|
|
Hi Nic,
Please consider the below explanation
The input 01 consist the below
Code: |
15 ALPHABET-($).
17 ABC-($) PIC 9(3).
17 DEF-($) PIC 9(3).
17 GHIJK-($) PIC 9(5).
17 LMNO-($) PIC 9(4).
17 PQRSTU-($) PIC 9(6).
17 VWXYZ-($) PIC S9(5) COMP-3. |
The input 02 consist the below (start field)
The input 03 consist the below (end field)
So here what I need is, the program should read all the inputs and need to fetch the fields from start field to end field from input 01 and write into an output file
So the desired output should be,
Code: |
15 ALPHABET-($).
17 ABC-($) PIC 9(3).
17 DEF-($) PIC 9(3).
17 GHIJK-($) PIC 9(5).
17 LMNO-($) PIC 9(4). |
|
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
And which PHB has come up with this ludicrous requirement?
Quote: |
Can someone please help me out to solve this through a sample cobol. |
Which, cynic mode on, really means: Can anyone do my work for me.
This is a forum for experts, and experts charge at least USD/EUR/GBP 100 per hour. Are you prepared to pay? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
if You look at the top left of the page You will see
EXPERT FORUM
and You qualify Yourself as
Quote: |
software engineer
Mainframe Skills: COBOL,JCL,DB2 |
unfortunately the question You asked really does not qualify You as an expert
and certainly not skilled in COBOL
You might be better off migrating here
www.ibmmainframeforum.com/
A Help & Support Forum for Mainframe Beginners
topic locked |
|
Back to top |
|
|
|