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 

OUTREC on Variable Length Input Record

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


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Fri May 13, 2005 11:16 am    Post subject: OUTREC on Variable Length Input Record Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri May 13, 2005 11:28 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Siddheart22
Beginner


Joined: 11 Apr 2005
Posts: 42
Topics: 19
Location: India

PostPosted: Fri May 13, 2005 12:49 pm    Post subject: OUTREC on Variable Length Input Record Reply with quote

Thanks Kolusu.
It did work..

Regards,
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