Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Bulding a FB trailer from a VBA input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 188
Location: india

PostPosted: Wed Jun 05, 2013 7:48 am    Post subject: Bulding a FB trailer from a VBA input file
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: 2158
Location: @my desk

PostPosted: Wed Jun 05, 2013 8:33 am    Post subject:
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: 188
Location: india

PostPosted: Wed Jun 05, 2013 9:50 am    Post subject:
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: 2158
Location: @my desk

PostPosted: Wed Jun 05, 2013 1:01 pm    Post subject:
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: 2158
Location: @my desk

PostPosted: Wed Jun 05, 2013 2:19 pm    Post subject:
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    Post subject:
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

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us