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
 

 

Is there a way to create more than one output record per inp

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

New User


Joined: 16 Mar 2007
Posts: 8
Location: State of Arizona

PostPosted: Tue Dec 16, 2008 4:26 am    Post subject:
Reply with quote

Is there a way to create more than one output record per input record on the "outrec" in iceman? the first outrec pulls from the input, but the remaining are just static records.

I am pulling programs from a source library, capturing the compile proc for that program and creating execute JCL. I was using iceman to do the JCL and it works now, but need to add 2 more records for symbolic
usage.

Vaquero
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Dec 16, 2008 5:22 am    Post subject:
Reply with quote

Hi,

if I understood your question correctly this may assist,

Code:
//STEP0001 EXEC PGM=ICEMAN                                           
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD *                                                       
REC1                                                                 
REC2                                                                 
REC3                                                                 
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  OPTION COPY                                                         
  INREC OVERLAY=(81:SEQNUM,8,ZD)                                     
  OUTFIL IFTHEN=(WHEN=(81,8,ZD,EQ,1),BUILD=(1:01,80,/,               
                 1:C'INSERT1',/,                                     
                 1:C'INSERT2')),                                     
        IFTHEN=(WHEN=NONE,                                           
                BUILD=(1:01,80))                                     
/*                                                                   


After the first REC1, 2 records are added.


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

DFSORT Moderator


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

PostPosted: Tue Dec 16, 2008 6:12 am    Post subject:
Reply with quote

Quote:
Is there a way to create more than one output record per input record on the "outrec" in iceman?


The OUTFIL statement can be used to create more than one output record per input record in several ways including the use of / in BUILD, and the use of HEADERx and TRAILERx. How you would do it exactly depends on exactly what you want to do.

If you need more help, give an example of the records in the input file and what you expect for output, and explain the "rules" for getting from input to output.

Gerry,

Your example could be coded more simply as:

Code:

  OPTION COPY                                             
  OUTFIL IFOUTLEN=80,                                     
    IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),           
    IFTHEN=(WHEN=(81,8,ZD,EQ,1),BUILD=(1:1,80,/,           
                 1:C'INSERT1',/,                           
                 1:C'INSERT2'))                           


Of course, that may or may not be what the OP is looking for.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Dec 16, 2008 6:26 am    Post subject:
Reply with quote

Hi,

thanks Frank


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

New User


Joined: 16 Mar 2007
Posts: 8
Location: State of Arizona

PostPosted: Tue Dec 16, 2008 8:58 pm    Post subject:
Reply with quote

This is what works now, but I need to add two more output records containing: // loadlib='xxx.xxx.xxx',
// srclib='xxx.xxx.xxx'

current working:

Code:

//*********************************************************
//*** FORMAT JCL FOR COB3CSQL PROGRAMS TO COMPILE         
//*********************************************************
//COB3CSQL EXEC PGM=ICEMAN,REGION=0M,                     
//            PARM='SIZE=MAX'                             
//SYSOUT   DD SYSOUT=*                                     
//SYSPRINT DD SYSOUT=*                                     
//SORTIN   DD DSN=#SWS.AFS.TRN.PGM.REPORT,DISP=SHR         
//SORTOUT  DD DSN=#SWP.AFS.JCLLIB(COB3CSQL),DISP=SHR       
//SYSIN    DD *                                           
 OUTREC FIELDS=(C'//',23,8,C' EXEC ',23,8,C',MBR=',2,8,C' 
                        ')                                 
 INCLUDE COND=(23,8,CH,EQ,C'COB3CSQL')                     
 SORT FIELDS=COPY                                         
/*
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Dec 16, 2008 10:14 pm    Post subject:
Reply with quote

Carol Mellinger,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                               
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                           
 XXXXXXXX             COB3CSQL                           
 YYYYYYYY             COB3CSQL                           
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                       
  INCLUDE COND=(23,8,CH,EQ,C'COB3CSQL')                   
  OUTFIL OUTREC=(C'//',23,8,C' EXEC ',23,8,C',MBR=',2,8,/,
                 C'// LOADLIB=''',C'XXX.XXX.XXX''',/,     
                 C'// SRCLIB=''',C'XXX.XXX.XXX''')       
/*


The output from this job is

Code:

//COB3CSQL EXEC COB3CSQL,MBR=XXXXXXXX     
// LOADLIB='XXX.XXX.XXX'                 
// SRCLIB='XXX.XXX.XXX'                   
//COB3CSQL EXEC COB3CSQL,MBR=YYYYYYYY     
// LOADLIB='XXX.XXX.XXX'                 
// SRCLIB='XXX.XXX.XXX'                   
Back to top
View user's profile Send private message
Carol Mellinger

New User


Joined: 16 Mar 2007
Posts: 8
Location: State of Arizona

PostPosted: Tue Dec 16, 2008 11:10 pm    Post subject:
Reply with quote

Works great with the exception that I had to change my output record to 37 bytes instead of 80. Instead of using an iebgener to convert to 80 bytes, is there an easier way using ICEMAN?
Error received:
[size=7]ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE222A 0 37 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 80 BYTE LRECL FOR SORTOUT
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705
ICE052I 3 END OF DFSORT
[/size]
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Tue Dec 16, 2008 11:24 pm    Post subject:
Reply with quote

Modify this line
Code:
OUTFIL OUTREC=(C'//',23,8,C' EXEC ',23,8,C',MBR=',2,8,/,

AS
Code:
OUTFIL OUTREC=(C'//',23,8,C' EXEC ',23,8,C',MBR=',2,8,80:X,/,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Dec 17, 2008 12:08 am    Post subject:
Reply with quote

Carol,

If you had just mentioned that your input records were 37 bytes and you wanted output records of 80 bytes, then Kolusu would have shown you how to handle that in the first place. He and everyone else was assuming that your input records were 80 bytes and you never said otherwise. In the future, please give the RECFM and LRECL of your input file and output file so people don't have to make assumptions.
Back to top
View user's profile Send private message
Carol Mellinger

New User


Joined: 16 Mar 2007
Posts: 8
Location: State of Arizona

PostPosted: Wed Dec 17, 2008 1:10 am    Post subject:
Reply with quote

Actually the input was 133 bytes and the output had to be 80 bytes.
I will be more careful next time to include all the facts. - thanks
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 Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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