View previous topic :: View next topic
|
Author |
Message |
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
Operation i need to do is -
1- extract data from I/P file(400 FB) position 62:16 and write it into O/P file(80 FB).
2- After extracting all above records I have to add a note in the bottom. For eg- " Above records are erroneous"
Pls let me know if i can refer an existing topic somewhere. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Ok, so what you have tried? |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
as per my knowledge i have an option to use SORT first and then merge two DS (extracted and text) in another step. But can we do it in a single step, in single sort ? and avoiding another DS with hardcoded text. That i can include in SORT card if i can do it in SORT step only using OUTREC and positioning my text in the end somehow. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
am trying something like this-
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,
OUTREC FIELDS=(1:62,16),
TRAILER1=(18:'HII')
/* |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
So, what hapened? |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
SYNTAX ERROR is there and usage of TRAILER is not correct perhaps-
Code: |
SYSIN :
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,
OUTREC FIELDS=(1:62,16),
*
TRAILER1=(18:'HII')
*
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Code: |
SORT FIELDS=COPY
OUTFIL REMOVECC,BUILD=(62,16),TRAILER1=('HII') |
Try this. You might need to increase the data record length to the length of the trailer text by filling the rest of the places with spaces in the BUILD statement. |
|
Back to top |
|
|
|