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
 

 

How to deal with this program?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to deal with this program?
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: 171
Location: Bangalore

PostPosted: Sat May 06, 2006 3:55 pm    Post subject:
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 Moderator


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

PostPosted: Sat May 06, 2006 7:43 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Sun May 07, 2006 8:17 pm    Post subject:
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    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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm


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