bit to 8 different char

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Sat Feb 22, 2014 3:15 am

Thanks Guys

But testing for some records has been failed and no one is here to correct me :(

example

OutPut :

00000111

which should be

00001111


It means we have a data in last 4 bit of REIMB-CODE. Again need your help and guidence

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Sat Feb 22, 2014 5:28 am

I have run this:

Code: Select all

 OPTION COPY,STOPAFT=1 
 OUTFIL REPEAT=256, 
       IFTHEN=(WHEN=INIT,BUILD=(SEQNUM,1,BI,START=0)), 
       IFTHEN=(WHEN=INIT,OVERLAY=(2:7C'0',X,1,1,TRAN=BIT)), 
       IFTHEN=(WHEN=(1,1,BI,BO,X'40'),OVERLAY=(2:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BO,X'20'),OVERLAY=(3:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BO,X'10'),OVERLAY=(4:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BO,X'08'),OVERLAY=(5:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BO,X'04'),OVERLAY=(6:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BO,X'02'),OVERLAY=(7:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BO,X'01'),OVERLAY=(8:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BO,X'80'),OVERLAY=(1:C'1'),HIT=NEXT),
       IFTHEN=(WHEN=(1,1,BI,BZ,X'80'),OVERLAY=(1:C'0'),HIT=NEXT),
       IFTHEN=(WHEN=(1,8,CH,EQ,10,8,CH),OVERLAY=(18:C'Y')) 
This takes any FB file (I used DD *) and processes the first record (content irrelevant). It replicates the record 256 times. It assigns a binary sequence number starting at zero. It uses the code I suggested to you, and compares the result of that code to the output of TRAN=BIT for the same value.

All 256 records get marked with Y. The code I suggested is correct. You have either implemented it incorrectly, or described it incorrectly, or your testers have errorneously bounced it.

Post the sysout from the step you used. Use your input which allegedly produced the incorrect result. Do HEX ON for the data and paste that as well.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun Feb 23, 2014 5:08 am

What was the hex input that generated the incorrect result?

I suspect it will help if you post the actual jcl and sort control used (copy/paste Not retype) along with the generated output including all messages with message id.
Have a good one

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Mon Feb 24, 2014 8:08 pm

William/ Dik
Please find below sysout

Sysout :

SYSDIAG= 6851696, 9502323, 9502323, 4970550
8,876K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
128K BYTES RESERVE REQUESTED, 1,347,536 BYTES USED
20K BYTES OF EMERGENCY SPACE ALLOCATED
SORTIN : RECFM=F ; LRECL= 1000; CISIZE = 4096
SORTIN : DSNAME=TT.C.EMPLOYEE
INREC RECORD LENGTH = 8
SORTOUT : RECFM=FB ; LRECL= 8; BLKSIZE= 27992
SORTOUT : DSNAME=TT.C.EMPLOYEE.TEST
7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
0 BYTES RESERVE REQUESTED, 1,220,560 BYTES USED
INSERT 0, DELETE 1832015
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
VSAM WAS USED FOR SORTIN
SORTOUT : EXCP'S=1,UNIT=3390,DEV=2739,CHP=(4042444647484C4E,1),VOL=S9
RCD IN 1841963, OUT 9948
RELEASE 1.4 BATCH 0520 TPF LEVEL 0.1
END SYNCSORT - TESTV17,EMPACT1,,DIAG=A000,73CA,88A2,0044,E85E,4CE3,0A
Last edited by Vikas.betu on Thu Feb 27, 2014 8:58 pm, edited 2 times in total.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Mon Feb 24, 2014 8:42 pm

Your data does not seem to bear any relation to your control cards.

Can you show the output for that input.

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Tue Feb 25, 2014 2:00 am

William, I just need to extract only first column of this input file vsam file into seq file.
account is reimb next year and this year only then it should be like this: 0000 0011
account is reimb only 3 and 4 years back only: 0011 0000

Please find below example of current input file and output binary output as per your code
Last edited by Vikas.betu on Thu Feb 27, 2014 8:56 pm, edited 2 times in total.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Feb 25, 2014 4:04 pm

The value you show for position one is X'C9'. So the output being zero does not make sense. Is you data on variable-length records.

Post the sysout from the step, in the Code tags to preseve spacing.

Vikas.betu
Member
Posts: 29
Joined: Tue Feb 18, 2014 9:13 pm

Post by Vikas.betu » Wed Feb 26, 2014 2:33 am

Thanks all. I got the correct result. William thakns for your great help.. :D

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Jan 25, 2016 9:39 pm

<< Content deleted By Admin >>

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others