MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
Siddheart22 Beginner Joined: 11 Apr 2005 Posts: 42 Topics: 19 Location: India
Posted: Fri May 13, 2005 11:16 am Post subject: OUTREC on Variable Length Input Record
Hi,
Input File is variable length with maximum length as 400 bytes:
01 Input-Record.
05 Filler pic x(43).
05 Emp-Number pic s9(09) comp-3.
05 Filler pic x(37).
05 Emp-name pic x(11).
05 filler pic x(64).
Requirement:
- I need to Replace the Emp-Name by 'Jane Doe ' and in the Emp-Number field I need to replace the first 3 bytes by 3 binary zeroes.
- Output file attributes should be identical as input.
Following is my SORT card:
SORT FIELDS=(COPY)
OUTFIL OUTREC=(1,4,5,43,3Z,47,2,49,37,C'JANE DOE ',93)
Question:
I am getting an abend while running the Sort program. The abend says - SORTOUT HAS INCOMPATIBLE LRECL'
In my JCL, I have defined the LRECL parameter for SORTOUT as 400.
I am not sure what could be the problem.
Could someone advise please.
Thanks,
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri May 13, 2005 11:28 am Post subject:
Siddheart22,
Try this sort card
Code:
SORT FIELDS=COPY
OUTREC FIELDS=(1,4, $ RDW
5,43, $ FILLER
3Z, $ 3 BINARY ZEROES
51,2 $ REST 2 BYES OF EMP-NUMBER
53,37, $ FILLER
C'JANE DOE ', $ CONSTANT
101) $ REST OF THE DATA
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
Siddheart22 Beginner Joined: 11 Apr 2005 Posts: 42 Topics: 19 Location: India
Posted: Fri May 13, 2005 12:49 pm Post subject: OUTREC on Variable Length Input Record
Thanks Kolusu.
It did work..
Regards,
Back to top
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