Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Find total number of records for a paticular id

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

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 23, 2010 9:46 pm    Post subject: Find total number of records for a paticular id
Reply with quote

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
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 23, 2010 10:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 23, 2010 10:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 23, 2010 11:28 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 23, 2010 11:31 pm    Post subject:
Reply with quote

Sorry, but I don't speak COBOL. Please provide the information asked for in the form asked for.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 23, 2010 11:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 23, 2010 11:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Sat Apr 24, 2010 11:00 pm    Post subject:
Reply with quote

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
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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us