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 

Error while Appending a Record

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


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Fri Jul 23, 2004 2:54 pm    Post subject: Error while Appending a Record Reply with quote

Hi,

Can anyone please help me with this control statement:
Code:

//TOOLIN    DD *
  COPY FROM(IN)  USING(CTL1)
  SORT FROM(MIX) USING(CTL2)
//CTL1CNTL  DD *
  OUTFIL FNAMES=CONV,
  OUTREC=(1,20,TRAN=ALTSEQ,30:X,SEQNUM,8,ZD)
  ALTSEQ CODE=(150A,1C1F,101E)
  OUTFIL FNAMES=BINA,
  OUTREC=(20X,1,10,30:X,SEQNUM,8,ZD)
//CTL2CNTL  DD *
  OPTION ZDPRINT,EQUALS
  SORT FIELDS=(31,8,CH,A)
  SUM FIELDS=(21,10,CH)
  OUTFIL FNAMES=OUT,OUTREC=(1,30)
/*

I am facing errors in 2 statements above:
1) OUTREC=(20X,1,10,30:X,SEQNUM,8,ZD)
2) SUM FIELDS=(21,10,CH)
_________________
Regards,
Programmer
Back to top
View user's profile Send private message
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Fri Jul 23, 2004 3:02 pm    Post subject: Reply with quote

I guess, I need to be more clear on the requirement:

1) I have 1 input file of 30 bytes
2) I need to convert the first 20 bytes to ASCII
3) The rest 10 Bytes should pass on as it is.
4) The output file will be 30 bytes long, with the first 20 bytes as converted ASCII and the rest 10 as they were in Input.

Here in the code above:

I am first trying to split the I/P file into 2 files, convert the first file and then merge them back to get the output record.

Any help would be appretiated.
_________________
Regards,
Programmer
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Fri Jul 23, 2004 4:04 pm    Post subject: Reply with quote

The following DFSORT job will do what you said you wanted in your second post:

Code:

//S1    EXEC  PGM=ICEMAN                                           
//SYSOUT    DD  SYSOUT=*                                           
//SORTIN DD DSN=... input file                               
//SORTOUT DD DSN=...  output file   
//SYSIN    DD    *                                                 
  OPTION COPY                                                       
  OUTREC FIELDS=(1,20,TRAN=ALTSEQ,21,10)                           
  ALTSEQ CODE=(150A,1C1F,101E)                                     


I can't figure out what you're trying to do in your first post or what it has to do with the requirements in your second post, but the errors in the two statements are as follows:

1) OUTREC=(20X,1,10,30:X,SEQNUM,8,ZD)

20X,1,10 gives a length of 30 bytes, so you can't use 30: because that would overlap the previous field. The next byte is 31, not 30, so you need 31:

2) SUM FIELDS=(21,10,CH)

SUM deals with numeric formats. CH is NOT a numeric format so it can't be used with SUM. You can use ZD.

However, I don't think this job is really what you want given the requirements in your second post.
_________________
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
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Fri Jul 23, 2004 4:52 pm    Post subject: Reply with quote

Hi Frank,

Thanks a million for your help.
_________________
Regards,
Programmer
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 -> 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