View previous topic :: View next topic
|
Author |
Message |
baljinders
New User
Joined: 21 Aug 2006 Posts: 72
|
|
|
|
I need to find the total number of records for a particular id in a huge PS file variable length. The issure here is the the field location for that ID is not fixed. There are 50 occurances of the defined field and a particualr id say 45 can be in any of the occurences. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Your description of the input records is too vague for anyone to give you a general solution. You need to do a better job of describing what you're trying to do exactly.
Please show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. Cover all relevant variations in your example. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Show some sample input and the output you want from that input.
Mention any "rules". Mention the dsorg and lrecl of the files. |
|
Back to top |
|
|
baljinders
New User
Joined: 21 Aug 2006 Posts: 72
|
|
|
|
copy book field:
Code: |
02 WS-OCCURS-TRADE OCCURS 0 TO 30 TIMES
DEPENDING ON WS-NBR
INDEXED BY WS-CNT.
10 WS-INPUT-DATA PIC X(30).
10 WS-DAY-TRADE REDEFINES WS-INPUT-DATA.
15 WS- DAY-TRADE -TYPE PIC S999 COMP-3.
15 WS-DIV PIC X(28).
10 WS-DAILY-TRADE REDEFINES IP-INPUT-DATA.
15 WS- DAILY-TRADE -TYPE PIC S999 COMP-3.
88 WS-TRADE-TYP VALUE +50.
15 WS- RES PIC X(28) |
and rest of the fields which get redeinded the same way
I need to find out all the records in the input file that have value 50 in WS-TRADE-TYP. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Sorry, but I don't speak COBOL. Please provide the information asked for in the form asked for. |
|
Back to top |
|
|
baljinders
New User
Joined: 21 Aug 2006 Posts: 72
|
|
|
|
LRECL of input file = 3500, 1st 500 are fixed records
RECFM= VBS
WS-NBR field also appears in a 2nd file. I need to fetch records from input file based on matching the ws-nbr in 2nd file and ws-trade-typ. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Again:
Quote: |
Please show an example of the records in your input file (relevant fields only) and what you expect for output. Give the starting position, length and format of each relevant field. |
|
|
Back to top |
|
|
baljinders
New User
Joined: 21 Aug 2006 Posts: 72
|
|
|
|
I was able to get what i wanted using a cobol program. Sorry for not so clear description of the problem because if was written in a hurry plus it was also half clear to me at that time.
Thanks again |
|
Back to top |
|
|
|