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

JCL Utility in accordance to the copybook layout


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

New User


Joined: 19 May 2009
Posts: 11
Location: Hyderabad

PostPosted: Tue Dec 08, 2015 8:46 pm
Reply with quote

Hi,

I have a requirement like below.
Input : Copybook Layout
Output : File with Sample Data in accordance to the copybook layout

Is it possible through any Utility or REXX program?

Thanks.[/b]
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue Dec 08, 2015 11:29 pm
Reply with quote

Do you mind to tell us why do you need this at first place?
How many such copybooks do you have? If fewer then write a COBOL program and pass the copybook name though JCL parm and create files so in short each para in that program corresponds to unique copybook layout.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Dec 09, 2015 6:27 am
Reply with quote

If this is a one-off task and for very few copybook then it would be quicker to construct the records by hand. Otherwise I think you are going to have to do one program per copybook although a Rexx solution could read the copybook and create data for each field as it is read in - but do not come running here when you have to create packed decimal data as there are routines out there on the web - possibly in the rexx forum of this forum.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Dec 10, 2015 4:53 pm
Reply with quote

  • If you don't have it, download the Smart DFSORT Tricks pdf file (worth even if you have SYNCSORT).
  • Use all the information in chapter "Create DFSORT Symbols from COBOL Copybook" to map your copybook.
    You may want to make some adaptations (no need for group fields or different output format, for example).
  • Write a COBOL program. Input will be the "symbols" file instead of the COBOL copybook.
    As you will have the offset, the length and the format, it should be quite easy to build a "record" containing valid data.
  • By valid I mean in the correct format. In the example in the pdf file, you have a date and a time fields.
    You'll have to detect this (by checking the field name?) and generate logically valid data.
    Same goes for other fields (will you need a sequence number or a random number? How to generate a name and so on).
Good Luck.
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 REASON 00D70014 in load utility DB2 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Trying to change copybook in online c... CICS 4
No new posts Help to Filter File Manager Copybook ... DFSORT/ICETOOL 14
Search our Forums:

Back to Top