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

Doubt in the resequencing job using a control card


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

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Sep 10, 2007 5:50 pm
Reply with quote

In my site we have a JCL for resequencing the input records in a file.
I found the following SORT card in the JCl. What does B and R represent
in that JCL?

Code:
0003 02 B R


It is a VB file and hence i guess they are taking into consideration the
last 2 bytes (3 and 4) in RDW. To my knowledge i guess the first 2 bytes
in RDW would contain the record length and the next 2 bytes would be
zeroes. I think they are adding seq no starting from 0 till no of records
using the control card. Please confirm as am not sure
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Sep 10, 2007 6:02 pm
Reply with quote

What you provided is not, by itself, a sort card.....
And your guess is as good as anyones.....
Maybe you might provide the surounding JCL?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Sep 10, 2007 6:40 pm
Reply with quote

The JCL executes SY31 utility (Do not know if it is a generalized utility) to resequence the records. This JCL uses the control card posted in my last post.

If it is a user defined program (SY31) , is there any other way to resequence the records in a file using SORT?

We dont have the COBOL of the program that is executed in the JCL.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Sep 10, 2007 6:51 pm
Reply with quote

SY31 rings no bells with me.......
Specificly (with examples), from what, to what, do you want resequenced?
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: Mon Sep 10, 2007 7:17 pm
Reply with quote

Hello,

In addition to posting sample data and the resequencing requirements, it may help if you post all of the jcl for the existing step.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Sep 10, 2007 7:32 pm
Reply with quote

The objective of the JCL is to resequence the jobs(Put it in a definite order). The only detail i have is the CONTROL card.

Input before resequencing

Code:

     Â   5304673043  0000000000                   
   é    5306642111  0000000000                   
   É ï@  5624264320  0000000000


output after resequencing

Code:

     Â   5304673043  0000000000           
     Â   5306642111  0000000000           
     ï@  5624264320  0000000000


Data in the 3-4 bytes have been edited but I am not sure as to what has been added/deleted to/from the input file.
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: Mon Sep 10, 2007 8:06 pm
Reply with quote

Hello,

As previously requested, please post all of the jcl (and control statements) for this step.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Sep 10, 2007 8:07 pm
Reply with quote

Try displaying it with HEX ON.....
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: Mon Sep 10, 2007 9:17 pm
Reply with quote

Hmmm ...

0003 02 B R

might mean to resequence with a 2-byte binary value in positions 3-4. If so, you could use these DFSORT control statements to do that:

Code:

   OPTION COPY
   OUTREC OVERLAY=(7:SEQNUM,2,BI)



Or it could mean something completely different.

You can try using this DFSORT job to display the input and output data in hex and post the output from the //SYSOUT for each job. That might help us figure out what you need to do.

Code:

//SHOWIN EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   input file (VB)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTREC BUILD=(1,4,1,20,HEX)
/*
//SHOWOUT EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   output file (VB)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTREC BUILD=(1,4,1,20,HEX)
/*
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Sep 11, 2007 1:52 pm
Reply with quote

Quote:

As previously requested, please post all of the jcl (and control statements) for this step.


Dick,

Sorry for the delay.

Code:

//S01  EXEC PGM=SY31
//STEPLIB  DD  DSN=PBUA.LOADLIBB,DISP=SHR                         
//INFILE  DD DSN=PBUA.BEFORE.RESEQ,       
//        DISP=SHR                                               
//OUTFILE DD DUMMY                                               
//DELFILE DD DSN=PBUA.AFTER.RESE1,       
//   DISP=(NEW,CATLG,DELETE),                                     
//   UNIT=SYSALLDA,                                               
//   SPACE=(CYL,(500,100),RLSE)                                   
//SYSIN   DD DSN=PBUA.CONTROL.DATA(RESEQ),DISP=SHR         
//*



Control card


Code:
0003 02 B R
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Sep 11, 2007 2:00 pm
Reply with quote

Quote:
You can try using this DFSORT job to display the input and output data in hex and post
the output from the //SYSOUT for each job. That might help us figure out what you need to do.


I have displayed the input and output data in hex.

SHOWIN:

Code:

000001 02710000211C000200621C4040F5F3F0F4F6F7F3     
000002 02710000211C005100621C4040F5F3F0F6F6F4F2     
000003 02450000211C007100577C4040F5F6F2F4F2F6F4     
000004 02240000211C007B00544C4040F2F0F9F7F8F6F1     
000005 02430000211C007C00575C4040F2F0F9F7F8F6F5     
000006 02670000211C015700611C4040F4F0F8F8F9F7F0     
000007 02360000211C016600562C4040F7F7F5F9F6F2F9


SHOWOUT

Code:

000001 02710000211C000100621C4040F5F3F0F4F6F7F3 
000002 02710000211C000200621C4040F5F3F0F6F6F4F2 
000003 02450000211C000300577C4040F5F6F2F4F2F6F4 
000004 02240000211C000400544C4040F2F0F9F7F8F6F1 
000005 02430000211C000500575C4040F2F0F9F7F8F6F5 
000006 02670000211C000600611C4040F4F0F8F8F9F7F0 
000007 02360000211C000700562C4040F7F7F5F9F6F2F9


I don't see any difference in the above two displays. Does that mean that
the input is aldready in sequence?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 3:08 pm
Reply with quote

If what's being guessed at it correct, it does look like the input was already in sequence.....
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: Tue Sep 11, 2007 6:31 pm
Reply with quote

Hello,

You might "unsort" the input and then run this step. If you run a sort step that sequences the data by the last 2 positions, and run that output thru your process, you could if the SY31 step puts the data back into the current sequence.

If it does not, we need to re-think what SY31 might be doing.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Sep 11, 2007 6:59 pm
Reply with quote

Quote:

If what's being guessed at it correct, it does look like the input was already in sequence.....


Even that was my guess, but what confuses me is the data that is edited in the input file. As already posted Data in the 3-4 bytes have been edited but I am not sure as to what has been added/deleted to/from the input file.

But the data it looks the same when displayed using Frank's Job.
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 JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Need suggestion on a sort card DFSORT/ICETOOL 10
No new posts Want to mask Middle 8 Digits of Debit... COBOL Programming 3
Search our Forums:

Back to Top