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

Create Dynamic Control Cards Using Icetool


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

New User


Joined: 06 Feb 2007
Posts: 29
Location: Noida

PostPosted: Thu May 26, 2011 2:00 am
Reply with quote

Hi,

I want to create dynamic control cards using icetool.

I have 3 files of VB LRECEL = 200 as the data and I want to create the control card in this fashion
Code:

********************************* Top of Data ******************************
 INREC FINDREP=(STARTPOS=17,ENDPOS=046,
            INOUT=(C'|XXXXXXXXXX|',C'|----+----1|',
 C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|',C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|',
Data
 C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|',C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|')).


The control card can be of VB LRECL = 200.



I tried to create a control card by using the HEADER and TRAILER parameter but it only allows VBA or FBA files. Also the (C'|XXXX etc are not recognized when I try to simply copy the data to a file and then merge it with the data.

Can anybody please help me in this?

Thanks
Sudip
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 26, 2011 2:10 am
Reply with quote

Hello,

You need to post sample data of what you have as "input" and the "output" you want when this data is processed.

Mention the recfm and lrecl of all of the files.

Mention any "rules" for getting from the input to the output.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu May 26, 2011 2:28 am
Reply with quote

Quote:
Can anybody please help me in this?


Not based on the information you've provided.

Quote:
The control card can be of VB LRECL = 200.


Not if you want it to be used by DFSORT. The control statement data set for DFSORT must have RECFM=FB and LRECL=80.

Quote:
tried to create a control card by using the HEADER and TRAILER parameter but it only allows VBA or FBA files.


To create an FB/80 output data set from a VB/200 data set, you would use something like:

Code:

   OUTFIL REMOVECC,VTOF,BUILD=(5,80)


In order to help you more, I'd have to know what you're actually trying to do which you haven't explained clearly. I don't know if you want to extract information from input records and put them in the control statements, or just generate the control statements without using extracted input fields, or what. You'd need to explain exactly what you're trying to do with an example of your input records and expected output records.
Back to top
View user's profile Send private message
sudib19

New User


Joined: 06 Feb 2007
Posts: 29
Location: Noida

PostPosted: Thu May 26, 2011 3:21 am
Reply with quote

Hi Frank/Dick,

Thanks for the reply and I apologize if the requirement was not clear.

I want to dynamically create a sort card within the same JCL so that I can use it in my subsequent step.

My input are 3 files which I am building in the job, all of them are Variable Blocked and have a record length of 200 which looks like this
Code:


********************************* Top of Data **********************************
C'|ATOWN                  |',C'|ATWN                   |',
C'|BWATER                 |',C'|BWTR                   |',


I want to create a Sort Card within the same job.. this would be my output for a subsequent step and would look like

Code:

********************************* Top of Data **********************************
 INREC FINDREP=(STARTPOS=17,ENDPOS=046,
            INOUT=(C'|XXXXXXXXXX|',C'|----+----1|',
 C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|',C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|',
 C'|ATOWN                  |',C'|ATWN                   |',
 C'|BWATER                 |',C'|BWTR                   |',
 C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|',C'|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|'))
******************************** Bottom of Data ********************************


Thanks
Sudip
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu May 26, 2011 3:50 am
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN DD *
  OPTION COPY
  OUTFIL REMOVECC,VTOF,BUILD=(3:5,65,80:X),
    HEADER1=('  INREC FINDREP=(STARTPOS=17,ENDPOS=046,',/,
    '    INOUT=(C''|XXXXXXXXXX|'',C''|----+----1|'',',/,
    '  C''|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|'',',
    'C''|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|'','),
    TRAILER1=('  C''|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|'',',
    'C''|XXXXXXXXXXXXXXXXXXXXXXXXXXXX|''))')
/*
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 create a list of SAR jobs with... CA Products 3
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top