MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Program logic needed

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Wed Jun 11, 2008 8:48 pm    Post subject: Program logic needed Reply with quote

Hai,

I have a file as below:
Code:

ABC  MAINFRAMES
ABC  MAINFRAMES
ABC  MAINFRAMES
ABC  MAINFRAMES
DEF  JAVA
DEF  JAVA
DEF  JAVA
DEF  JAVA
XYZ  ASP 

I want the output in the way as below with first the header coming and then the detail record and whenever the department changes i want to have 3 blank lines and then again header and detail record should come and i want program logic for this not SORT as i want to implement in program only.
Code:

DEPT   DEPTNAME
ABC   MAINFRAMES
ABC   MAINFRAMES
ABC   MAINFRAMES
ABC   MAINFRAMES



DEPT   DEPTNAME
DEF      JAVA
DEF      JAVA
DEF      JAVA
DEF      JAVA



DEPT   DEPTNAME
XYZ    ASP
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Jun 12, 2008 1:07 am    Post subject: Reply with quote

Excuse me, but does this mean you want us to do the work for you so that you can get the credit for it? It does not look like you have even attempted to make a solution with either a program or a utility (for example DFHSORT).
Back to top
View user's profile Send private message Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Jun 12, 2008 3:44 am    Post subject: Reply with quote

Basic control-break processing. Any decent programming book will have examples. If you are at work then look at other programs around - a lot of them will have some sort of thing that is similar. If you are at school then the lecturere should have told you enough to figure it out and your recommended text books would definitely have it. Even if not then you should be able to come up with some idea which you can try out.
clue 1 - do while not eof
clue 2 - do while same key
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Thu Jun 12, 2008 9:56 am    Post subject: Reply with quote

clue 3 - show some effort and provide details, like, oh, I don't know, the language you're using
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group