IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to deal with this program?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Brian's_song

New User


Joined: 27 Dec 2005
Posts: 21

PostPosted: Sat May 06, 2006 10:36 am
Reply with quote

Hi all,
Just a question"
Input data:
=================================
AAA@001
AAA~001
AAA#002
BBB%001
BBB&001
CCC*001
CCC(001
CCC)001
=================================
for a certain name-colunm 1 to 3 (AAA,BBB,CCC), once there is one of his score (column 5-column 7) not = 001, his name will be written to the out put file.
So the expected out put is:
=================================
AAA
=================================

How can I do it ? Thanks!
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Sat May 06, 2006 3:55 pm
Reply with quote

Hi Brian,

You can do this lot of ways.
If you are able to understand the FOCUS Language. I can do it and give for you. Let me know if you are intrested in FOCUS.


Thanks
Shri
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Sat May 06, 2006 7:43 pm
Reply with quote

Here's a DFSORT job that will do what I think you asked for:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN DD *
* Get records with not = 001 in 5-7
  INCLUDE COND=(5,3,CH,NE,C'001')
* Sort on name
  SORT FIELDS=(1,3,CH,A)
* Remove duplicates for each name
  SUM FIELDS=NONE
* Show name
  OUTREC FIELDS=(1,3)
/*
Back to top
View user's profile Send private message
Brian's_song

New User


Joined: 27 Dec 2005
Posts: 21

PostPosted: Sun May 07, 2006 6:55 pm
Reply with quote

Hi shrivatsa,
Thanks you for your advice. But I am not understand.

Hi Frank,
The data I gave was just a part of the whole. Actually, For each certain Name, there will be 1 to 99 score for him, for instance, may be AAA have 3 scores, so he will have 3 records; for BBB, he be has 10 scores so there will be 10 records which column 3 to 10 is 'BBB', etc

What I sould do is :For a cartain Name, if not all of his score is = 001,
I will catch this Name and write it into the output file.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Sun May 07, 2006 8:17 pm
Reply with quote

I gave you a job based on what you asked for. If you wanted something else, why didn't you say so in the first place? First you say the name is in 1-3 - now you seem to be saying the name is in 3-10. Which is it?

I think the job I gave you does what you want, although if the fields are not where you said they were in your first post, you'll need to change the control statements accordingly. Did you try that?

If you still need help, then please show a better example of the records in your input file and what you want for output, and explain clearly the "rules" for getting from input to output. What is the position, length and format of the name field? What is the position, length and format of the score field? What is the RECFM and LRECL of the input file?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top