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 

Syncsort - Report from reading rows b/n multiple HDR & T

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
rajinfy123
Beginner


Joined: 10 Jan 2007
Posts: 1
Topics: 1

PostPosted: Mon Apr 27, 2009 4:41 pm    Post subject: Syncsort - Report from reading rows b/n multiple HDR & T Reply with quote

In the below first 3 byte determine the record-type and remaining all are different field values.A report is to be generated reading HDR record until next HDR record encountered. Read each of GRP record for first 3 field values followed by next associated SUB records until next GRP record encountered. In the SUB record consider last 2 field value for the report.In the report, Page number to be incremented only within HDR to TRL, as soon as another HDR encountered,Page number to be restarted from 1 again.

Pls let me know if anything unclear.

Thanks in advance for your help,
Raj.

[code]
INPUT:
~~~~~~
HDR TZ100PQRTK200
GRP YAHOO 1000 CAR XXXXX
SUB MARY SMITH HONDA ACCORD
SUB JOHN SMITH TOYOTA CAMRY
SUB ALEX SMITH NISSAN MAXIMA
GRP INFY 3114 MINIVAN YYYYY
SUB ANNY LEADS TOYOTA INNOVA
TRL00006
HDR TZ400PQRTQ300
GRP MICTEK 3111 CAR ZZZZZ
SUB RAJ PATEL HONDA CIVIC
SUB MOHAN JOHN FORD MUSTANG
TRL 00003


Output expected:
~~~~~~~~~~~~~~~~

TZ100PQRTK200 PAGE : 1

ROWHDR1 ROWHDR2 ROWHDR3 ROWHDR4 ROWHDR5
~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~
YAHOO 1000 CAR HONDA ACCORD
YAHOO 1000 CAR TOYOTA CAMRY
YAHOO 1000 CAR NISSAN MAXIMA
INFY 3114 MINIVAN TOYOTA INNOVA


TZ400PQRTQ300 PAGE : 1

ROWHDR1 ROWHDR2 ROWHDR3 ROWHDR4 ROWHDR5
~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~
MICTEK 3111 CAR HONDA CIVIC
MICTEK 3111 CAR FORD MUSTANG

[/code]
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 -> Job Control Language(JCL) 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