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 

merging two files to produce one output

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
shl0842
Beginner


Joined: 30 Jan 2007
Posts: 3
Topics: 1

PostPosted: Fri Feb 09, 2007 1:14 pm    Post subject: merging two files to produce one output Reply with quote

Need help in producing a single report out of multiple. Receiving an error i do not understand. The control cards follows:
[code:1:c15f57746f]
* Split off 0400 and 0404 records and reformat
COPY FROM(IN) USING(CTL1)
* Keep only records that have the same userid in the 0400 record
* and the 0404 record
SELECT FROM(CONCT) TO(TEMP2) ON(1,44,CH) ALLDUPS
* Sort by profile fields from reformatted 0404 records
* with binary zeros in reformatted 0400 records.
SORT FROM(TEMP2) TO(TEMP1) USING(CTL2)
* Create report using needed fields from joined 0400 and 0404 records
DISPLAY FROM(TEMP1) LIST(PRNTDSP) BLANK -
TITLE(' data access records for hlq') -
BETWEEN(2) -
HEADER('profile namE') ON(1,44,CH) -
HEADER('authid') ON(46,8,CH) -
HEADER('access') ON(57,9,CH) -
HEADER('uacc') ON(68,8,CH) -
HEADER('grpid') ON(78,8,CH)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=TEMP1,VTOF,
* Select 0400 records
INCLUDE=(5,4,CH,EQ,C'0400'),
* Reformat 0400 records to look like this:
*
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Feb 09, 2007 2:38 pm    Post subject: Reply with quote

Code:

  OUTREC=(1:44,                   
    46:8z,57:9z,68:133,8,78:156,8)


You have a column (1:), then a starting position (44) and then another column (46:). You need a starting postion and a length, not just a starting position. That is:

Code:

  OUTREC=(1:p,m,                   
    46:8Z,57:9Z,68:133,8,78:156,8)


p,m might be 1,44 or 44,10 or whatever you need.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shl0842
Beginner


Joined: 30 Jan 2007
Posts: 3
Topics: 1

PostPosted: Fri Feb 09, 2007 3:49 pm    Post subject: Reply with quote

frank,
i received the following errors:
[code:1:03f7a3c878]
CTL1CNTL :
OUTFIL FNAMES=TEMP1,VTOF,
* Select 0400 records
INCLUDE=(5,4,CH,EQ,C'0400'),
* Reformat 0400 records to look like this:
*
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Feb 09, 2007 6:11 pm    Post subject: Reply with quote

Pease show the error messages you received.

I don't see anything wrong with the first OUTREC operand (unless your input record is too small to contain the input fields you're trying to use), but it's hard to say without knowing the actual error message you received.

The second OUTREC operand has the same type of problem you had originally - 46:62,57: is missing the length - it should be 46:p,m,57:
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shl0842
Beginner


Joined: 30 Jan 2007
Posts: 3
Topics: 1

PostPosted: Mon Feb 12, 2007 12:41 pm    Post subject: Reply with quote

i corrected my errors. Its running now. thanks for pointing me in the right direction.

david
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities 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