IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem while writing reqd fields into output file - SORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 37
Location: Chennai

PostPosted: Thu Oct 13, 2011 6:23 am
Reply with quote

Hi,

I have a input file (1894 bytes) with different type of record layouts. I'm trying to write only required fields in each record type into a output file of 147 bytes. The issue is job fails with invalid record length on the output file.

INPUT FILE IS 1894 BYTES
OUTPUT FILE NEEDED IS 147 BYTES

Here is my sort card, please help on this.

Code:

//STEP1 EXEC PGM=SYNCSORT
//SORTIN   DD DISP=SHR,DSN=IN-FILE1                 
//SORTOUT  DD DSN=OUT-FILE1,
//            DISP=(,CATLG,DELETE),
//            DCB=(RECFM=FB,LRECL=147,BLKSIZE=0),                       
//            UNIT=(SYSDA,8),SPACE=(CYL,(1,5),RLSE)                     
//SYSIN    DD *                                                         
    SORT  FIELDS=COPY                                                   
    OMIT COND=(1,1,CH,EQ,C'A',OR,1,1,CH,EQ,C'Z')
    OUTREC IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),BUILD=(1,15,25,8,246,14,       
                                                348,9,386,31,566,9,     
                                                663,18,703,12,753,31)),
           IFTHEN=(WHEN=(1,1,CH,EQ,C'D'),BUILD=(1,15,25,8,45,5,75,2,   
                                                112,10,288,10,400,97))  /*
//
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 13, 2011 7:17 am
Reply with quote

Hi,

please show job output.


Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 13, 2011 7:28 am
Reply with quote

Hi,

change as below
Code:
    SORT  FIELDS=COPY                                                   
    OMIT COND=(1,1,CH,EQ,C'A',OR,1,1,CH,EQ,C'Z')                       
    OUTREC IFOUTLEN=147,                                               
           IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),BUILD=(1,15,25,8,246,14,       
                                                348,9,386,31,566,9,     
                                                663,18,703,12,753,31)),
           IFTHEN=(WHEN=(1,1,CH,EQ,C'D'),BUILD=(1,15,25,8,45,5,75,2,   
                                                112,10,288,10,400,97)) 


Gerry
Back to top
View user's profile Send private message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 37
Location: Chennai

PostPosted: Thu Oct 13, 2011 9:10 pm
Reply with quote

Thanks a lot for your help.Its working now.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Oct 14, 2011 3:31 am
Reply with quote

Hi,

another happy customer.


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Oct 18, 2011 4:47 pm
Reply with quote

gcicchet wrote:
another happy customer.
How much did you charge! If that's confidential, use PM... icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top