View previous topic :: View next topic
|
Author |
Message |
mksranjani
New User
Joined: 03 Feb 2010 Posts: 29 Location: Chennai
|
|
|
|
It is 80 bytes |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I have neither the documentation with me nor connectivity to a Syncsort system so i can't test.
PUSH=(81:1,32))
How was this determined?
Sorry i don't just have the answer, bit i'm kinda trying to deal with one error at a time . . . |
|
Back to top |
|
|
mksranjani
New User
Joined: 03 Feb 2010 Posts: 29 Location: Chennai
|
|
|
|
LRECL is 80 bytes, and the data in first line starts at col 1 with length 32.
Im not sure if this is correct. But I tried like this. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Infact the first push should suffice
Change ID=1 to 1,32
Use INCLUDE/OMIT to pic records that is needed then format GET record
Remove the second ifthen |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
here is a solution as has been suggested
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABCDEFG.TXT
CD AAAAAA
CD BBBBBB
CD CCCCCCC
CD DDDDDDD
LOCSITE PRI=5 CY SEC=1 CY U=TESTDA REC=FB LR=1402 BLOCKSI=0
GET +
USER.NONX.USER9999.SAMPLE(+1)'
QUIT
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,4,ZD)),
IFTHEN=(WHEN=GROUP,BEGIN=(81,4,ZD,EQ,+1),PUSH=(85:1,32))
OUTREC IFTHEN=(WHEN=(1,4,CH,EQ,C'GET '),
OVERLAY=(5:85,32))
OUTFIL OMIT(81,4,ZD,EQ,+1),BUILD=(1,80)
|
Gerry |
|
Back to top |
|
|
mksranjani
New User
Joined: 03 Feb 2010 Posts: 29 Location: Chennai
|
|
|
|
Gerry,
I tried the code you provided. Got the output as below. The data in first line is removed but it is not moved near 'get'.
Code: |
cd aaaaaa
cd bbbbbb
cd ccccccc
cd ddddddd
locsite pri=5 cy sec=1 cy u=testda rec=fb lr=1402 blocksi=0
get +
USER.NONX.USER9999.SAMPLE(+1)'
quit |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
my get is in upper case, try changing it to lower case.
Gerry |
|
Back to top |
|
|
mksranjani
New User
Joined: 03 Feb 2010 Posts: 29 Location: Chennai
|
|
|
|
Gerry,
I changed it to lower case, and I got the expected result.
Great and thanks a lot! |
|
Back to top |
|
|
|