MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
kingofbeasts Beginner Joined: 23 Sep 2003 Posts: 5 Topics: 2
Posted: Wed Oct 22, 2003 11:35 am Post subject: Pad a constant in VB
Hi,
I want to pad a constant 'D' at the begining of the records in a file. The file is VB and is having the record length as 9279. The SYNCTOOL is used.
The sort card created is:
Quote: //TOOLIN DD *
COPY FROM(IN) TO(OUT) USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,4,5:C'D',6:5,9278)
/*
I am getting "OUTREC - SHORT RECORD" Error.
The record on which the sorting is made is having a length of 805.
The record length will differ for each record as it is VB. Can any one suggest the method to handle this condition.
Thanks,
Naveen
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Oct 22, 2003 12:21 pm Post subject:
Naveen,
For Vb records you don't have to specify the entire length. so change your sort card to the following.
Code:
OUTREC FIELDS=(1:1,4, $ RDW
5:C'D', $ CONSTANT VALUE
6:5) $ REST OF THE RECORD
Since you are using COPY statement in toolin you don't have to code SORT FIELDS=COPY in your
control cards.
Hope this helps...
cheers
kolusu
Back to top
kingofbeasts Beginner Joined: 23 Sep 2003 Posts: 5 Topics: 2
Posted: Thu Oct 23, 2003 3:02 am Post subject:
Kolusu,
Thanks for the reply.
I need to retain the length of the record. When a constant is added, the length of the record is increased. Please suggest
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Oct 23, 2003 5:01 am Post subject:
Naveen,
Just hard code the Lrecl on the sortout dataset , so that the last byte gets truncated.
Kolusu
Back to top
kingofbeasts Beginner Joined: 23 Sep 2003 Posts: 5 Topics: 2
Posted: Fri Oct 24, 2003 5:17 am Post subject:
Kolusu,
I am getting "OUTPUT LRECL REQUIRES PADDING OR TRUNCATION" error message.
The sort card used is
Quote:
//TOOLIN DD *
COPY FROM(IN) TO(OUT) USING(HHHH)
COPY FROM(IN) TO(OUT) USING(DDDD)
COPY FROM(IN) TO(OUT) USING(TTTT)
//HHHHCNTL DD *
OPTION STOPAFT=1
//DDDDCNTL DD *
OPTION SKIPREC=1
OMIT COND=(5,7,CH,EQ,C'TRAILER')
OUTREC FIELDS=(1:1,4,5:C'D',6:5)
//TTTTCNTL DD *
OPTION SKIPREC=1
INCLUDE COND=(5,7,CH,EQ,C'TRAILER')
/*
I am removing the header and trailer before padding a constant to each detail record.
Please suggest, if any wrong in the sort card.
Thanks,
Naveen
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Oct 24, 2003 8:32 am Post subject:
Naveen,
Are you getting a informational message(WERNNNI ) or abend-error message(WERNNNA ) ?
The informational message can be ignored. If you are indeed getting a abend-error message then can you please post the sysout which contains the messages.Post the entire sysout message.
Kolusu
Back to top
kingofbeasts Beginner Joined: 23 Sep 2003 Posts: 5 Topics: 2
Posted: Tue Nov 11, 2003 5:44 am Post subject:
Kolusu,
I was on vacation for some day.
Here is the sysout of the SYNCTOOL
Quote:
DDDDCNTL :
OPTION SKIPREC=1
OMIT COND=(5,7,CH,EQ,C'TRAILER')
OUTREC FIELDS=(1:1,4,5:C'D',6:5)
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=IN,SORTOUT=OUT,SORTDD=DDDD,COPY
WER901I **WARNING** SYNCSORT PRODUCT WILL EXPIRE IN 29 DAYS
WER428I CALLER-PROVIDED IDENTIFIER IS "0002"
WER164B 1,028K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I IN : RECFM=VB ; LRECL= 9283; BLKSIZE= 27998
WER237I OUTREC RECORD LENGTH = 9284
WER110I OUT : RECFM=VB ; LRECL= 9283; BLKSIZE= 27998
WER462I OUTPUT LRECL REQUIRES PADDING OR TRUNCATION
WER247A OUT HAS INCOMPATIBLE LRECL
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Naveen
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Nov 11, 2003 8:51 am Post subject:
Naveen,
Try addding the parm VLTRIM.The VLTRIM parameter defines a byte to be deleted from the end of a variable-length record. All prior occurrences of this byte will also be deleted until a byte that is not equal to the trim byte is found. The resulting records are decreased in record length.
Code:
OUTFIL VLTRIM=C' ',OUTREC FIELDS=(1:1,4,5:C'D',6:5)
Hope this helps...
cheers
kolusu
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