Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file

Google
 
Web mainframegurukul.com

Header date to overlay on all subsequent records

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
carlosd
Member


Joined: 14 Sep 2009
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Sep 14, 2009 6:26 pm    Post subject: Header date to overlay on all subsequent records Reply with quote

I have a file which contains a date in the header (YYYMMDD), and I need to add/overlay this to each subsequent data record along with a sequence number.

The sequence number I have found, and have got that OK - but I am unable to find out how to carry down the header date.

Any help would be appreciated !
_________________
Carlos
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Sep 14, 2009 8:21 pm    Post subject: Reply with quote

Please show an example of the records in your input file (relevant fields only) and what you expect for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of all relevant fields.
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
carlosd
Member


Joined: 14 Sep 2009
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Sep 14, 2009 8:41 pm    Post subject: Reply with quote

This is the header record with the date starting in pos 28 and ending in pos 35

........XXXXXXXXXIV0000421920090905

LRECL - 3094, RECFM FB

I have the same records being output, same length etc - but at pos 3076 I need the date (acquired from the header) on each record followed by the sequence number (which I have found how to do)

200909050000000001
0000000002
0000000003
0000000004

I managed to get the date to be output on the hdr record in pos 3076, but I don't know how to carry it down to subsequent records so it should appear like :-

200909050000000001
200909050000000002
200909050000000003
200909050000000004

It's as if I want to put the date to a working storage field which can be used in the detail records as well.

I have been through several of the ICETOOL/DFSORT manuals but can't find what should relate to this.

Thanks !
_________________
Carlos
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
carlosd
Member


Joined: 14 Sep 2009
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Sep 14, 2009 8:43 pm    Post subject: Reply with quote

carlosd wrote:


200909050000000001
0000000002
0000000003
0000000004



Don't know why that didn't come out correctly - but the above is actually

200909050000000001

and then the following sequence numbers are preceded by 8 spaces
0000000002
0000000003
0000000004

Thanks
_________________
Carlos
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Sep 14, 2009 9:11 pm    Post subject: 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/3094)
//SORTOUT DD DSN=...  output file (FB/3094)
//SYSIN    DD    *
  OPTION COPY
   INREC IFTHEN=(WHEN=INIT,OVERLAY=(3084:SEQNUM,10,ZD)),
   IFTHEN=(WHEN=GROUP,BEGIN=(3084,10,ZD,EQ,1),
    PUSH=(3076:28,8))
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
carlosd
Member


Joined: 14 Sep 2009
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2009 2:38 pm    Post subject: Reply with quote

Thanks for the help.

It appears that our installation does not accept the syntax for WHEN=GROUP

We have
SYNCSORT FOR Z/OS 1.3.1.0
and then
OPTION COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(3084:SEQNUM,10,ZD)),
IFTHEN=(WHEN=GROUP,BEGIN=(3084,10,ZD,EQ,1),
*
PUSH=(3076:28,Cool)
WER268A INREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Thanks
_________________
Carlos
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
carlosd
Member


Joined: 14 Sep 2009
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2009 3:50 pm    Post subject: Reply with quote

Here's the output formatted properly :-

Code:
SYSIN :
  OPTION COPY
    INREC IFTHEN=(WHEN=INIT,OVERLAY=(3084:SEQNUM,10,ZD)),
    IFTHEN=(WHEN=GROUP,BEGIN=(3084,10,ZD,EQ,1),
                 *
     PUSH=(3076:28,8))
WER268A  INREC STATEMENT   : SYNTAX ERROR
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

_________________
Carlos
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
carlosd
Member


Joined: 14 Sep 2009
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2009 6:55 pm    Post subject: Reply with quote

I think I have answered my own question - it appears that WHEN=GROUP came in with V1.5 and we are on V1.3

Do you know if there is any other solution if WHEN=GROUP cannot be used ?

Thanks !
_________________
Carlos
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2009 8:14 pm    Post subject: Reply with quote

The job works fine with DFSORT. The WER messages indicate you're using Synsort, not DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
carlosd
Member


Joined: 14 Sep 2009
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2009 8:29 pm    Post subject: Reply with quote

Oh OK - Thanks for the help anyway - we have ICEMAN and ICETOOL as well so assumed it was all part of the same thing - apologies.
_________________
Carlos
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2009 8:58 pm    Post subject: Reply with quote

You have Syncsort. Syncsort ships ICEMAN and ICETOOL as aliases so if you have Syncsort, PGM=ICEMAN or PGM=SORT invokes Syncsort and PGM=ICETOOL invokes Syncsort's SYNCTOOL. If you had DFSORT (ICE messages), PGM=ICEMAN and PGM=SORT would invoke DFSORT and PGM=ICETOOL would invoke DFSORT's ICETOOL.
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
arcvns
Member


Joined: 30 May 2009
Posts: 28
Location: Chennai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Sep 17, 2009 11:22 pm    Post subject: Reply with quote

Quote:
it appears that WHEN=GROUP came in with V1.5 and we are on V1.3
Carlos,

You're running SYNCSORT FOR Z/OS 1.3.1. "WHEN=GROUP" is supported by the latest version of SyncSort which is SYNCSORT FOR Z/OS 1.3.2.

Quote:
Do you know if there is any other solution if WHEN=GROUP cannot be used ?
Yes. This is untested. You can try this SYMNAMES approach as an alternative to the WHEN=GROUP solution posted above.
Code:
//SORT001 EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD DSN=...Input-file (FB/LRECL=3094)               
//SORTOUT  DD DSN=&&T1,DISP=(,PASS)         
//SYSIN    DD *                 
  SORT FIELDS=COPY,STOPAFT=1             
  OUTREC BUILD=(C'DATE-X,''',28,8,C'''',80:X)
//SORT002 EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SYMNAMES DD DSN=&&T1,DISP=(OLD,PASS)             
//SORTIN   DD DSN=...Input-file  (FB/LRECL=3094)               
//SORTOUT  DD DSN=...Output-file (FB/LRECL=3094)           
//SYSIN   DD *                 
  INREC OVERLAY=(3076:DATE-X,SEQNUM,11,ZD)
  SORT FIELDS=COPY

_________________
Arun
Back to top
View user's profile Send private message Yahoo Messenger
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Jan 25, 2016 10:28 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-4649.html