bit to 8 different char
Moderators: Frank Yaeger, Moderator Group
-
- Member
- Posts: 29
- Joined: Tue Feb 18, 2014 9:13 pm
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
I have run this:
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.
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'))
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.
-
- Member
- Posts: 29
- Joined: Tue Feb 18, 2014 9:13 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
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.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Member
- Posts: 29
- Joined: Tue Feb 18, 2014 9:13 pm
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
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.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
-
- Member
- Posts: 29
- Joined: Tue Feb 18, 2014 9:13 pm
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page