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

Bulding a FB trailer from a VBA input file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed Jun 05, 2013 7:48 am
Reply with quote

Hello,

I am try to build a trailer record from a VBA file (LRECL=32756) to a FB file(LRECL=20)

The trailer should be like :-

Code:
YYYYMMDD000001000100


YYYYMMDD is the DATE
000001 is just a constant
000100 is the count of records from the input file


I have build the below job which is not working for me..

Code:

//S1 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD DSN=INPUT_FILE,                         
//            DISP=SHR                                 
//OUT      DD DSN=OUTPUT_FILE_TAILOR,                 
//          DISP=(NEW,CATLG,DELETE),                   
//             SPACE=(CYL,(1,1)),UNIT=SYSDA,           
//          DCB=(DSORG=PS,RECFM=FB,LRECL=20,BLKSIZE=0)
//SYSIN    DD  *                                       
 SORT FIELDS=COPY                                     
 INREC BUILD=(1,5,7:DATE1-1,12X)                       
 OUTFIL FNAMES=OUT,CONVERT,NODETAIL,REMOVECC,         
 TRAILER1=(13,8,'000001',COUNT=(M11,LENGTH=6))         
/*                                                     




Error received :-

Code:
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 12:14 ON
           SORT FIELDS=COPY                                               
           INREC BUILD=(1,5,7:DATE1-1,12X)                               
           OUTFIL FNAMES=OUT,CONVERT,NODETAIL,REMOVECC,                   
           TRAILER1=(13,8,'000001',COUNT=(M11,LENGTH=6))                 
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5                   
ICE126A 9 INCONSISTENT REFORMATTING FOR OUT     : REASON CODE 05, IFTHEN 0
ICE751I 0 C5-K76982 C6-K90026 C7-K58148 C8-K67572 E9-K60824 E7-K70685     
ICE052I 3 END OF DFSORT                                                   



Please assist..

Thank you,
Rajat
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jun 05, 2013 8:33 am
Reply with quote

Rajat,

You have given NODETAIL in OUTFIL which would suppress the data records, but from your INREC statement it looks like you need the data records as well!
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 199
Location: india

PostPosted: Wed Jun 05, 2013 9:50 am
Reply with quote

Hello Arun,

This issue is only when i am trying to use the VBA as input file and I want to build the FB as output file with just the trailer record in it.

The below job is working fine when I create VBA as the output file :-

Code:

//S1 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD DSN=INPUT_FILE,                         
//            DISP=SHR                                 
//OUT      DD DSN=OUTPUT_FILE_TAILOR,                 
//          DISP=(NEW,CATLG,DELETE),                   
//             SPACE=(CYL,(1,1)),UNIT=SYSDA,           
//         DCB=(DSORG=PS,RECFM=VBA,LRECL=32756,BLKSIZE=32760)
//SYSIN    DD  *                                               
 SORT FIELDS=COPY                                             
 INREC BUILD=(1,5,7:DATE1-1,12X)                               
 OUTFIL FNAMES=OUT,NODETAIL,REMOVECC,                         
 TRAILER1=(7,8,'000001',COUNT=(M11,LENGTH=6))                 
/*                                                             



I also tried the VTOF parameter but again i am not able to create the FB file for the trailer output.

Code:

//S1 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD DSN=INPUT_FILE,                         
//            DISP=SHR                                 
//OUT      DD DSN=OUTPUT_FILE_TAILOR,                 
//          DISP=(NEW,CATLG,DELETE),                   
//             SPACE=(CYL,(1,1)),UNIT=SYSDA,           
//         DCB=(DSORG=PS,RECFM=FB,LRECL=20,BLKSIZE=0)
//SYSIN    DD  *                                               
 SORT FIELDS=COPY                                             
 INREC BUILD=(1,5,7:DATE1-1,12X)                               
 OUTFIL FNAMES=OUT,VTOF,NODETAIL,REMOVECC,                         
 TRAILER1=(7,8,'000001',COUNT=(M11,LENGTH=6))                 
/*               



Error :-
Code:


ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 14:15 ON
           SORT FIELDS=COPY                                               
           INREC BUILD=(1,5,7:DATE1-1,12X)                               
           OUTFIL FNAMES=OUT,VTOF,NODETAIL,REMOVECC,                     
           TRAILER1=(7,8,'000001',COUNT=(M11,LENGTH=6))                   
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5                   
ICE126A 9 INCONSISTENT REFORMATTING FOR OUT     : REASON CODE 05, IFTHEN 0
ICE751I 0 C5-K76982 C6-K90026 C7-K58148 C8-K67572 E9-K60824 E7-K70685     
ICE052I 3 END OF DFSORT   


Regards,
Rajat
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jun 05, 2013 1:01 pm
Reply with quote

rajatbagga,

My shop is not running DFSORT. But for the date in the trailer can't you use DATENS in TRAILER1 instead of attaching the date to all the data records in the INREC. I don't think this would fix your error, but I just felt it would be better this way.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jun 05, 2013 2:19 pm
Reply with quote

DFSORT Messages, Codes and Diagnosis Guide wrote:
ICE126A INCONSISTENT REFORMATTING FOR {*INREC|*OUTREC|ddname}: REASON CODE rsn, IFTHEN n

n: 0 if the error is not associated with an IFTHEN clause.

Reason code values (rsn) are as follows:

5. A VTOF or CONVERT operand was specified without an OUTREC or BUILD operand for variable-length input record to fixed-length output record conversion in an OUTFIL statement.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 05, 2013 10:23 pm
Reply with quote

rajatbagga,

If you looked up the message ICE126A you would have found the problem as to why your job failed. Check this link which explains the error

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1cm60/2.2.122?

Use the following job
Code:

//STEP0100 EXEC PGM=SORT                       
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD DISP=SHR,DSN=Your Input VBA file
//SORTOUT  DD DSN=OUTPUT_FILE_TAILOR,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(TRK,(1,0)),UNIT=SYSDA,
//            RECFM=FB
//SYSIN    DD  *
  OPTION COPY                                   
  INREC BUILD=(1,4,DATE1-1)                     
  OUTFIL VTOF,REMOVECC,NODETAIL,BUILD=(20X),   
  TRAILER1=(7,6,'  000001',COUNT=(M11,LENGTH=6))
//*
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top